diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-02 19:42:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-02 19:42:39 +0000 |
commit | de4845c163a5847c82d7ce10ed0c320098bce6e0 (patch) | |
tree | 797abd5d6d511637b4b4095246b46473f88f5bf8 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | f28f8bc40eedc6304ab25dd8bed486fa08f51f70 (diff) | |
download | external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.gz external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.bz2 external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.zip |
Switch the code generator (except the JIT) onto the new DebugLoc
representation. This eliminates the 'DILocation' MDNodes for
file/line/col tuples from -O0 -g codegen.
This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.
I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before. Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3e71d18b52..625a2b95f2 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'; } |