summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--codegen.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/codegen.hs b/codegen.hs
index b8d8c54..b9f822a 100644
--- a/codegen.hs
+++ b/codegen.hs
@@ -15,6 +15,8 @@ import qualified LLVM.General.AST.Float as A.F
-- import qualified LLVM.General.AST.Name as A
-- import qualified LLVM.General.AST.Instruction as A
import qualified LLVM.General.AST.IntegerPredicate as A
+import qualified LLVM.General.AST.Linkage as A.L
+-- import qualified LLVM.General.AST.Visibility as A.V
import qualified LLVM.General.AST as A
import Debug.Trace
@@ -236,6 +238,7 @@ genStringLiterals = liftM stringLiterals get >>= return . map gen
gen :: (LLName, String) -> A.Definition
gen (name, str) = A.GlobalDefinition $ A.globalVariableDefaults {
A.G.name = A.Name name,
+ A.G.linkage = A.L.Private,
A.G.isConstant = True,
A.G.type' = A.ptr (A.i8),
A.G.initializer = Just $ A.C.Array A.i8 $ [A.C.Int 8 (fromIntegral (ord c)) | c <- str] ++ [A.C.Int 8 0]