summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-04-03 07:51:10 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-04-03 07:51:10 +0000
commit62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a (patch)
treeba3309de92b14839b2ca6ca0c6d3b39714f95d4c /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent20e856b2a58d12231aa42d5d13888b15ac03e5a4 (diff)
downloadFreeBSD-src-62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a.zip
FreeBSD-src-62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a.tar.gz
Update LLVM to r100285.
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 3e71d18..625a2b9 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -340,19 +340,17 @@ static void EmitComments(const MachineInstr &MI, raw_ostream &CommentOS) {
const MachineFunction *MF = MI.getParent()->getParent();
const TargetMachine &TM = MF->getTarget();
- if (!MI.getDebugLoc().isUnknown()) {
- DILocation DLT = MF->getDILocation(MI.getDebugLoc());
-
- // Print source line info.
- DIScope Scope = DLT.getScope();
+ DebugLoc DL = MI.getDebugLoc();
+ if (!DL.isUnknown()) { // Print source line info.
+ DIScope Scope(DL.getScope(MF->getFunction()->getContext()));
// Omit the directory, because it's likely to be long and uninteresting.
if (Scope.Verify())
CommentOS << Scope.getFilename();
else
CommentOS << "<unknown>";
- CommentOS << ':' << DLT.getLineNumber();
- if (DLT.getColumnNumber() != 0)
- CommentOS << ':' << DLT.getColumnNumber();
+ CommentOS << ':' << DL.getLine();
+ if (DL.getCol() != 0)
+ CommentOS << ':' << DL.getCol();
CommentOS << '\n';
}
OpenPOWER on IntegriCloud