[llvm] r182321 - The DWARF EH pass doesn't need the TargetMachine, only the TargetLoweringBase like the other EH passes.

Bill Wendling isanbard at gmail.com
Mon May 20 14:54:18 PDT 2013


Author: void
Date: Mon May 20 16:54:18 2013
New Revision: 182321

URL: http://llvm.org/viewvc/llvm-project?rev=182321&view=rev
Log:
The DWARF EH pass doesn't need the TargetMachine, only the TargetLoweringBase like the other EH passes.

Modified:
    llvm/trunk/include/llvm/CodeGen/Passes.h
    llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
    llvm/trunk/lib/CodeGen/Passes.cpp

Modified: llvm/trunk/include/llvm/CodeGen/Passes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=182321&r1=182320&r2=182321&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/Passes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/Passes.h Mon May 20 16:54:18 2013
@@ -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.

Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=182321&r1=182320&r2=182321&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Mon May 20 16:54:18 2013
@@ -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

Modified: llvm/trunk/lib/CodeGen/Passes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Passes.cpp?rev=182321&r1=182320&r2=182321&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Passes.cpp (original)
+++ llvm/trunk/lib/CodeGen/Passes.cpp Mon May 20 16:54:18 2013
@@ -401,7 +401,7 @@ void TargetPassConfig::addPassesToHandle
   case ExceptionHandling::DwarfCFI:
   case ExceptionHandling::ARM:
   case ExceptionHandling::Win64:
-    addPass(createDwarfEHPass(TM));
+    addPass(createDwarfEHPass(TM->getTargetLowering()));
     break;
   case ExceptionHandling::None:
     addPass(createLowerInvokePass(TM->getTargetLowering()));





More information about the llvm-commits mailing list