summaryrefslogtreecommitdiffstats
path: root/llvm/examples/BrainF/BrainF.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-02-01 03:23:42 +0000
committerJames Y Knight <jyknight@google.com>2019-02-01 03:23:42 +0000
commit473e3420ce37fae60f7c6d1e6b08adc1fd0de71e (patch)
tree7b87b6d4a65766167a4d0cfc377af02a77a5246c /llvm/examples/BrainF/BrainF.cpp
parentb6c06dc28f96032d5bf101ed8e61549442dc912d (diff)
downloadbcm5719-llvm-473e3420ce37fae60f7c6d1e6b08adc1fd0de71e.tar.gz
bcm5719-llvm-473e3420ce37fae60f7c6d1e6b08adc1fd0de71e.zip
Fix compilation of examples after 13680223b9d8 / r352827
Who knew...they're not built by default or as part of the tests. llvm-svn: 352830
Diffstat (limited to 'llvm/examples/BrainF/BrainF.cpp')
-rw-r--r--llvm/examples/BrainF/BrainF.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp
index b4cbc780a04..2937f8c6cc1 100644
--- a/llvm/examples/BrainF/BrainF.cpp
+++ b/llvm/examples/BrainF/BrainF.cpp
@@ -82,7 +82,8 @@ void BrainF::header(LLVMContext& C) {
//Function header
//define void @brainf()
- brainf_func = module->getOrInsertFunction("brainf", Type::getVoidTy(C));
+ brainf_func = Function::Create(FunctionType::get(Type::getVoidTy(C), false),
+ Function::ExternalLinkage, "brainf", module);
builder = new IRBuilder<>(BasicBlock::Create(C, label, brainf_func));
OpenPOWER on IntegriCloud