summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index 62d9f7c74f2..2b9cf74f88a 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -29,8 +29,9 @@
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetFrameInfo.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
#include <ostream>
#include <string>
using namespace llvm;
@@ -2675,7 +2676,7 @@ public:
/// manager has created it. Set by the target AsmPrinter.
void SetModuleInfo(MachineModuleInfo *mmi) {
// Make sure initial declarations are made.
- if (!MMI && TAI->getSupportsExceptionHandling()) {
+ if (!MMI && ExceptionHandling && TAI->getSupportsExceptionHandling()) {
MMI = mmi;
shouldEmit = true;
}
OpenPOWER on IntegriCloud