diff options
author | Duncan Sands <baldrick@free.fr> | 2008-04-07 13:45:04 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-04-07 13:45:04 +0000 |
commit | 3c81269349934a51dc02c6a67442ef5e59cfca8e (patch) | |
tree | 9af3752cb94fdcdfdd719ba7917427fd01ac97ca /examples | |
parent | 17836443fc001dd20fc39126cdb343e6df04a86f (diff) | |
download | external_llvm-3c81269349934a51dc02c6a67442ef5e59cfca8e.zip external_llvm-3c81269349934a51dc02c6a67442ef5e59cfca8e.tar.gz external_llvm-3c81269349934a51dc02c6a67442ef5e59cfca8e.tar.bz2 |
Use Intrinsic::getDeclaration in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/BrainF/BrainF.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/BrainF/BrainF.cpp b/examples/BrainF/BrainF.cpp index b2959f2..3717ee7 100644 --- a/examples/BrainF/BrainF.cpp +++ b/examples/BrainF/BrainF.cpp @@ -25,6 +25,7 @@ #include "BrainF.h" #include "llvm/Constants.h" +#include "llvm/Intrinsics.h" #include "llvm/ADT/STLExtras.h" using namespace llvm; @@ -52,11 +53,7 @@ void BrainF::header() { //Function prototypes //declare void @llvm.memset.i32(i8 *, i8, i32, i32) - Function *memset_func = cast<Function>(module-> - getOrInsertFunction("llvm.memset.i32", Type::VoidTy, - PointerType::getUnqual(IntegerType::Int8Ty), - IntegerType::Int8Ty, IntegerType::Int32Ty, - IntegerType::Int32Ty, NULL)); + Function *memset_func = Intrinsic::getDeclaration(module, Intrinsic::memset_i32); //declare i32 @getchar() getchar_func = cast<Function>(module-> |