AsmPrinter: Stop creating DebugLocs
[oota-llvm.git] / lib / CodeGen / WinEHPrepare.cpp
index 48b3585e0cf355d2546f89abf2d0846d41641d09..b4019b4861706e749dbf9e189360c86d11d82732 100644 (file)
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/Pass.h"
+#include <memory>
+
 using namespace llvm;
 
 #define DEBUG_TYPE "winehprepare"
 
 namespace {
 class WinEHPrepare : public FunctionPass {
-  FunctionPass *DwarfPrepare;
+  std::unique_ptr<FunctionPass> DwarfPrepare;
 
 public:
   static char ID; // Pass identification, replacement for typeid.
@@ -73,13 +75,13 @@ bool WinEHPrepare::runOnFunction(Function &Fn) {
     return false;
 
   // Classify the personality to see what kind of preparation we need.
-  EHPersonality Pers = ClassifyEHPersonality(LPads.back()->getPersonalityFn());
+  EHPersonality Pers = classifyEHPersonality(LPads.back()->getPersonalityFn());
 
   // Delegate through to the DWARF pass if this is unrecognized.
   if (!isMSVCPersonality(Pers))
     return DwarfPrepare->runOnFunction(Fn);
 
-  // FIXME: Cleanups are unimplemented. Replace them with calls to @llvm.trap.
+  // FIXME: Cleanups are unimplemented. Replace them with unreachable.
   if (Resumes.empty())
     return false;