summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-13 04:09:18 +0000
committerOwen Anderson <resistor@mac.com>2009-07-13 04:09:18 +0000
commit53a52215b5480bd52f1aee5189c7b08a7098fc51 (patch)
tree20cde4af23fe30f2b0cf520520affbb0c66a53ab /llvm/examples
parent5302389442e928e7d8e9d07be1a4a463085d754a (diff)
downloadbcm5719-llvm-53a52215b5480bd52f1aee5189c7b08a7098fc51.tar.gz
bcm5719-llvm-53a52215b5480bd52f1aee5189c7b08a7098fc51.zip
Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
Diffstat (limited to 'llvm/examples')
-rw-r--r--llvm/examples/BrainF/BrainF.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/toy.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp
index cd9e850728f..38914688ec1 100644
--- a/llvm/examples/BrainF/BrainF.cpp
+++ b/llvm/examples/BrainF/BrainF.cpp
@@ -145,7 +145,7 @@ void BrainF::header(LLVMContext& C) {
//call i32 @puts(i8 *getelementptr([%d x i8] *@aberrormsg, i32 0, i32 0))
{
- Constant *zero_32 = Constant::getNullValue(IntegerType::Int32Ty);
+ Constant *zero_32 = C.getNullValue(IntegerType::Int32Ty);
Constant *gep_params[] = {
zero_32,
diff --git a/llvm/examples/Kaleidoscope/toy.cpp b/llvm/examples/Kaleidoscope/toy.cpp
index 3893aeac591..134742516d3 100644
--- a/llvm/examples/Kaleidoscope/toy.cpp
+++ b/llvm/examples/Kaleidoscope/toy.cpp
@@ -854,7 +854,7 @@ Value *ForExprAST::Codegen() {
// for expr always returns 0.0.
- return Constant::getNullValue(Type::DoubleTy);
+ return TheFunction->getContext()->getNullValue(Type::DoubleTy);
}
Value *VarExprAST::Codegen() {
OpenPOWER on IntegriCloud