Add a possibility to switch between CFI directives- and table-based frame description...
[oota-llvm.git] / lib / CodeGen / AsmPrinter / AsmPrinter.cpp
index e86042fbb88aab9e63327514a21c8c072046f78e..7f2b18c6e6f566092124b61e5bb2add789d91816 100644 (file)
@@ -188,7 +188,15 @@ bool AsmPrinter::doInitialization(Module &M) {
     DD = new DwarfDebug(this, &M);
 
   if (MAI->doesSupportExceptionHandling())
-    DE = new DwarfTableException(this);
+    switch (MAI->getExceptionHandlingType()) {
+    default:
+    case ExceptionHandling::DwarfTable:
+      DE = new DwarfTableException(this);
+      break;
+    case ExceptionHandling::DwarfCFI:
+      DE = new DwarfCFIException(this);
+      break;
+    }
 
   return false;
 }