#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.
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;