diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-05-20 21:54:18 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-05-20 21:54:18 +0000 |
commit | 3b1040c703c5e76b85b4431f4c84ccc4aa9f8508 (patch) | |
tree | 0b78ad5ddc040955dddafdea4a913d061191b345 | |
parent | 07418cde47c328f382144acd1972fabcf1529d11 (diff) | |
download | external_llvm-3b1040c703c5e76b85b4431f4c84ccc4aa9f8508.zip external_llvm-3b1040c703c5e76b85b4431f4c84ccc4aa9f8508.tar.gz external_llvm-3b1040c703c5e76b85b4431f4c84ccc4aa9f8508.tar.bz2 |
The DWARF EH pass doesn't need the TargetMachine, only the TargetLoweringBase like the other EH passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182321 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/Passes.h | 2 | ||||
-rw-r--r-- | lib/CodeGen/DwarfEHPrepare.cpp | 8 | ||||
-rw-r--r-- | lib/CodeGen/Passes.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index b02f63e..7ec90ae 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -527,7 +527,7 @@ namespace llvm { /// createDwarfEHPass - This pass mulches exception handling code into a form /// 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 /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow. diff --git a/lib/CodeGen/DwarfEHPrepare.cpp b/lib/CodeGen/DwarfEHPrepare.cpp index 31c8e59..ecfe6f3 100644 --- a/lib/CodeGen/DwarfEHPrepare.cpp +++ b/lib/CodeGen/DwarfEHPrepare.cpp @@ -42,8 +42,8 @@ namespace { public: static char ID; // Pass identification, replacement for typeid. - DwarfEHPrepare(const TargetMachine *TM) : - FunctionPass(ID), TLI(TM->getTargetLowering()), RewindFunction(0) { + DwarfEHPrepare(const TargetLoweringBase *TLI) : + FunctionPass(ID), TLI(TLI), RewindFunction(0) { initializeDominatorTreePass(*PassRegistry::getPassRegistry()); } @@ -59,8 +59,8 @@ namespace { char DwarfEHPrepare::ID = 0; -FunctionPass *llvm::createDwarfEHPass(const TargetMachine *tm) { - return new DwarfEHPrepare(tm); +FunctionPass *llvm::createDwarfEHPass(const TargetLoweringBase *TLI) { + return new DwarfEHPrepare(TLI); } /// GetExceptionObject - Return the exception object from the value passed into diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index bfbc062..1a6b62b 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -401,7 +401,7 @@ void TargetPassConfig::addPassesToHandleExceptions() { case ExceptionHandling::DwarfCFI: case ExceptionHandling::ARM: case ExceptionHandling::Win64: - addPass(createDwarfEHPass(TM)); + addPass(createDwarfEHPass(TM->getTargetLowering())); break; case ExceptionHandling::None: addPass(createLowerInvokePass(TM->getTargetLowering())); |