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 | 813384951e274b03dec8d0b15d9671533461d7bc (patch) | |
tree | fb84aae6dc12900ee3de908d9b44f1602cbc6940 /llvm/examples | |
parent | 1416ebf1fe56290cfc1e91e0aba71b93c0c275bc (diff) | |
download | bcm5719-llvm-813384951e274b03dec8d0b15d9671533461d7bc.tar.gz bcm5719-llvm-813384951e274b03dec8d0b15d9671533461d7bc.zip |
Use Intrinsic::getDeclaration in more places.
llvm-svn: 49338
Diffstat (limited to 'llvm/examples')
-rw-r--r-- | llvm/examples/BrainF/BrainF.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp index b2959f20001..3717ee70362 100644 --- a/llvm/examples/BrainF/BrainF.cpp +++ b/llvm/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-> |