1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

The DWARF EH pass doesn't need the TargetMachine, only the TargetLoweringBase like the other EH passes.

llvm-svn: 182321
This commit is contained in:
Bill Wendling 2013-05-20 21:54:18 +00:00
parent c46fd61418
commit 3688f3fab9
3 changed files with 6 additions and 6 deletions

View File

@ -527,7 +527,7 @@ namespace llvm {
/// createDwarfEHPass - This pass mulches exception handling code into a form /// createDwarfEHPass - This pass mulches exception handling code into a form
/// adapted to code generation. Required if using dwarf exception handling. /// adapted to code generation. Required if using dwarf exception handling.
FunctionPass *createDwarfEHPass(const TargetMachine *tm); FunctionPass *createDwarfEHPass(const TargetLoweringBase *tli);
/// createSjLjEHPreparePass - This pass adapts exception handling code to use /// createSjLjEHPreparePass - This pass adapts exception handling code to use
/// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow. /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow.

View File

@ -42,8 +42,8 @@ namespace {
public: public:
static char ID; // Pass identification, replacement for typeid. static char ID; // Pass identification, replacement for typeid.
DwarfEHPrepare(const TargetMachine *TM) : DwarfEHPrepare(const TargetLoweringBase *TLI) :
FunctionPass(ID), TLI(TM->getTargetLowering()), RewindFunction(0) { FunctionPass(ID), TLI(TLI), RewindFunction(0) {
initializeDominatorTreePass(*PassRegistry::getPassRegistry()); initializeDominatorTreePass(*PassRegistry::getPassRegistry());
} }
@ -59,8 +59,8 @@ namespace {
char DwarfEHPrepare::ID = 0; char DwarfEHPrepare::ID = 0;
FunctionPass *llvm::createDwarfEHPass(const TargetMachine *tm) { FunctionPass *llvm::createDwarfEHPass(const TargetLoweringBase *TLI) {
return new DwarfEHPrepare(tm); return new DwarfEHPrepare(TLI);
} }
/// GetExceptionObject - Return the exception object from the value passed into /// GetExceptionObject - Return the exception object from the value passed into

View File

@ -401,7 +401,7 @@ void TargetPassConfig::addPassesToHandleExceptions() {
case ExceptionHandling::DwarfCFI: case ExceptionHandling::DwarfCFI:
case ExceptionHandling::ARM: case ExceptionHandling::ARM:
case ExceptionHandling::Win64: case ExceptionHandling::Win64:
addPass(createDwarfEHPass(TM)); addPass(createDwarfEHPass(TM->getTargetLowering()));
break; break;
case ExceptionHandling::None: case ExceptionHandling::None:
addPass(createLowerInvokePass(TM->getTargetLowering())); addPass(createLowerInvokePass(TM->getTargetLowering()));