Bug#834 ICE (crash in code generator?) when building PCH .
authorJim Laskey <jlaskey@mac.com>
Wed, 19 Jul 2006 11:54:50 +0000 (11:54 +0000)
committerJim Laskey <jlaskey@mac.com>
Wed, 19 Jul 2006 11:54:50 +0000 (11:54 +0000)
Missing Darwin check in Intel ATT ASM printer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29204 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ATTAsmPrinter.cpp

index 3e690aa398d8ff1a7c5d5a1720827b8e2311ecd9..e94bf3a570582cfe52438c45f49c395ec88b4e93 100755 (executable)
@@ -26,9 +26,11 @@ using namespace llvm;
 /// method to print assembly for each instruction.
 ///
 bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
-  // Let PassManager know we need debug information and relay
-  // the MachineDebugInfo address on to DwarfWriter.
-  DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
+  if (Subtarget->TargetType == X86Subtarget::isDarwin) {
+    // Let PassManager know we need debug information and relay
+    // the MachineDebugInfo address on to DwarfWriter.
+    DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
+  }
 
   SetupMachineFunction(MF);
   O << "\n\n";