X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FShadowStackGC.cpp;h=10f64c709c7a325130c9e3efb34619bdfca29bb6;hb=c496875f0c205ffadcec8060e1170e1c58e4eb55;hp=e2919d3583ca8c87cc204d23da43e724ae3ad022;hpb=3ca2ad11567f83883ae2719c5fac5afc30c7b3d1;p=oota-llvm.git diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp index e2919d3583c..10f64c709c7 100644 --- a/lib/CodeGen/ShadowStackGC.cpp +++ b/lib/CodeGen/ShadowStackGC.cpp @@ -29,10 +29,10 @@ #include "llvm/CodeGen/GCs.h" #include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/GCStrategy.h" -#include "llvm/IntrinsicInst.h" -#include "llvm/Module.h" +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/IntrinsicInst.h" +#include "llvm/IR/Module.h" #include "llvm/Support/CallSite.h" -#include "llvm/Support/IRBuilder.h" using namespace llvm; @@ -116,8 +116,7 @@ namespace { // Branches and invokes do not escape, only unwind, resume, and return // do. TerminatorInst *TI = CurBB->getTerminator(); - if (!isa(TI) && !isa(TI) && - !isa(TI)) + if (!isa(TI) && !isa(TI)) continue; Builder.SetInsertPoint(TI->getParent(), TI); @@ -145,11 +144,9 @@ namespace { BasicBlock *CleanupBB = BasicBlock::Create(C, CleanupBBName, &F); Type *ExnTy = StructType::get(Type::getInt8PtrTy(C), Type::getInt32Ty(C), NULL); - // FIXME: Assuming the C++ personality function probably isn't the best - // thing in the world. Constant *PersFn = F.getParent()-> - getOrInsertFunction("__gxx_personality_v0", + getOrInsertFunction("__gcc_personality_v0", FunctionType::get(Type::getInt32Ty(C), true)); LandingPadInst *LPad = LandingPadInst::Create(ExnTy, PersFn, 1, "cleanup.lpad",