summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-23 18:06:37 +0000
committerChris Lattner <sabre@nondot.org>2003-11-23 18:06:37 +0000
commit210bccc1c217ea7c9ca66e2d3a75f03656b6aab0 (patch)
tree728c7c6e1a208d4575e0d65399208fd92cad071c
parent3425ec076455fc775bd5e5d7795516f65ceecdb6 (diff)
downloadbcm5719-llvm-210bccc1c217ea7c9ca66e2d3a75f03656b6aab0.tar.gz
bcm5719-llvm-210bccc1c217ea7c9ca66e2d3a75f03656b6aab0.zip
Fix these assertions:
stkrc -e -f -o testing.bc testing.st Global is external, but doesn't have external linkage! [1024 x int]* %_stack_ Global is external, but doesn't have external linkage! long* %_index_ Broken module found, compilation aborted! llvm-svn: 10185
-rw-r--r--llvm/projects/Stacker/lib/Makefile20
-rw-r--r--llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp4
2 files changed, 22 insertions, 2 deletions
diff --git a/llvm/projects/Stacker/lib/Makefile b/llvm/projects/Stacker/lib/Makefile
new file mode 100644
index 00000000000..6973e5be662
--- /dev/null
+++ b/llvm/projects/Stacker/lib/Makefile
@@ -0,0 +1,20 @@
+##===- projects/sample/Makefile ----------------------------*- Makefile -*-===##
+#
+# This is a sample Makefile for a project that uses LLVM.
+#
+##===----------------------------------------------------------------------===##
+
+#
+# Indicates our relative path to the top of the project's root directory.
+#
+LEVEL = ../../..
+
+#
+# Directories that needs to be built.
+#
+DIRS = compiler runtime
+
+#
+# Include the Master Makefile that knows how to build all.
+#
+include $(LEVEL)/Makefile.common
diff --git a/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp b/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
index 6ebcae9b365..4cd06461030 100644
--- a/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
+++ b/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
@@ -132,7 +132,7 @@ StackerCompiler::compile(
/*type=*/ stack_type,
/*isConstant=*/ false,
/*Linkage=*/ GlobalValue::AppendingLinkage,
- /*initializer=*/0,
+ /*initializer=*/Constant::getNullValue(stack_type),
/*name=*/ "_stack_",
/*parent=*/ TheModule
);
@@ -144,7 +144,7 @@ StackerCompiler::compile(
/*type=*/Type::LongTy,
/*isConstant=*/false,
/*Linkage=*/GlobalValue::LinkOnceLinkage,
- /*initializer=*/0,
+ /*initializer=*/Constant::getNullValue(Type::LongTy),
/*name=*/"_index_",
/*parent=*/TheModule
);
OpenPOWER on IntegriCloud