LLVM: Fix various typos in comments
[ghc-hetmet.git] / compiler / llvmGen / Llvm / AbsSyn.hs
index 1b8527b..a58ea77 100644 (file)
@@ -23,13 +23,13 @@ data LlvmBlock = LlvmBlock {
 
 type LlvmBlocks = [LlvmBlock]
 
--- | An LLVM Module. This is a top level contianer in LLVM.
+-- | An LLVM Module. This is a top level container in LLVM.
 data LlvmModule = LlvmModule  {
     -- | Comments to include at the start of the module.
     modComments  :: [LMString],
 
-    -- | Constants to include in the module.
-    modConstants :: [LMConstant],
+    -- | LLVM Alias type definitions.
+    modAliases   :: [LlvmAlias],
 
     -- | Global variables to include in the module.
     modGlobals   :: [LMGlobal],
@@ -44,13 +44,19 @@ data LlvmModule = LlvmModule  {
 -- | An LLVM Function
 data LlvmFunction = LlvmFunction {
     -- | The signature of this declared function.
-    funcDecl    :: LlvmFunctionDecl,
+    funcDecl  :: LlvmFunctionDecl,
+
+    -- | The functions arguments
+    funcArgs  :: [LMString],
 
     -- | The function attributes.
-    funcAttrs   :: [LlvmFuncAttr],
+    funcAttrs :: [LlvmFuncAttr],
+
+    -- | The section to put the function into,
+    funcSect  :: LMSection,
 
     -- | The body of the functions.
-    funcBody    :: LlvmBlocks
+    funcBody  :: LlvmBlocks
   }
 
 type LlvmFunctions  = [LlvmFunction]
@@ -122,7 +128,7 @@ data LlvmStatement
 
   {- |
     Raise an expression to a statement (if don't want result or want to use
-    Llvm unamed values.
+    Llvm unnamed values.
   -}
   | Expr LlvmExpression
 
@@ -168,12 +174,13 @@ data LlvmExpression
 
   {- |
     Navigate in an structure, selecting elements
+      * inbound: Is the pointer inbounds? (computed pointer doesn't overflow)
       * ptr:     Location of the structure
       * indexes: A list of indexes to select the correct value. For example
                  the first element of the third element of the structure ptr
                  is selected with [3,1] (zero indexed)
   -}
-  | GetElemPtr LlvmVar [Int]
+  | GetElemPtr Bool LlvmVar [Int]
 
   {- |
      Cast the variable from to the to type. This is an abstraction of three
@@ -199,7 +206,7 @@ data LlvmExpression
     Merge variables from different basic blocks which are predecessors of this
     basic block in a new variable of type tp.
       * tp:         type of the merged variable, must match the types of the
-                    precessors variables.
+                    predecessor variables.
       * precessors: A list of variables and the basic block that they originate
                     from.
   -}