Use the target triple from the target machine rather than the module
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index c4e77aafabc38f2844907f82c395c8f82b071a30..ee6308c466a6c834fedecdb0a5867e70e81ab96a 100644 (file)
@@ -176,7 +176,7 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
 
   // Turn on accelerator tables and older gdb compatibility
   // for Darwin.
-  bool IsDarwin = Triple(M->getTargetTriple()).isOSDarwin();
+  bool IsDarwin = Triple(A->getTargetTriple()).isOSDarwin();
   if (DarwinGDBCompat == Default) {
     if (IsDarwin)
       IsDarwinGDBCompat = true;