Revert "Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)"
[oota-llvm.git] / lib / CodeGen / ShadowStackGC.cpp
index e2919d3583ca8c87cc204d23da43e724ae3ad022..10f64c709c7a325130c9e3efb34619bdfca29bb6 100644 (file)
 #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<UnwindInst>(TI) && !isa<ReturnInst>(TI) &&
-              !isa<ResumeInst>(TI))
+          if (!isa<ReturnInst>(TI) && !isa<ResumeInst>(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",