diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-26 05:01:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-26 05:01:18 +0000 |
commit | 824598883513789516a919651f4b35e7a638ec5c (patch) | |
tree | 5a87b0b92a0c718d5f87d80b51cc4a6b9251eb63 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | be1f788676ff6a71bc0324ac38af7626fdcf92b2 (diff) |
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 23f62dba2c..c8099c8b18 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1739,10 +1739,11 @@ void AsmPrinter::EmitComments(const MachineInstr &MI) const { // Print source line info. O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << " SrcLine "; - if (DLT.CompileUnit) { - std::string Str; - DICompileUnit CU(DLT.CompileUnit); - O << CU.getFilename(Str) << " "; + if (DLT.CompileUnit->hasInitializer()) { + Constant *Name = DLT.CompileUnit->getInitializer(); + if (ConstantArray *NameString = dyn_cast<ConstantArray>(Name)) + if (NameString->isString()) + O << NameString->getAsString() << " "; } O << DLT.Line; if (DLT.Col != 0) @@ -1760,10 +1761,11 @@ void AsmPrinter::EmitComments(const MCInst &MI) const { // Print source line info O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << " SrcLine "; - if (DLT.CompileUnit) { - std::string Str; - DICompileUnit CU(DLT.CompileUnit); - O << CU.getFilename(Str) << " "; + if (DLT.CompileUnit->hasInitializer()) { + Constant *Name = DLT.CompileUnit->getInitializer(); + if (ConstantArray *NameString = dyn_cast<ConstantArray>(Name)) + if (NameString->isString()) + O << NameString->getAsString() << " "; } O << DLT.Line; if (DLT.Col != 0) |