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 | e2c4304654442ca353b307d73c86dce2a4acadbf (patch) | |
tree | 9af3752cb94fdcdfdd719ba7917427fd01ac97ca /examples/BrainF | |
parent | 3d292aca0306fbb65da4622c80df01432ab6559b (diff) |
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/BrainF')
-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 b2959f2000..3717ee7036 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-> |