summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-09 01:03:35 +0000
committerDevang Patel <dpatel@apple.com>2011-08-09 01:03:35 +0000
commit6c1ed31b3b94f97723ef870c9e633268580b80f3 (patch)
tree5006b0c6e13a2e6e9378f139a52714ee2f388d7c /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent3d6e38942d8ef62b6e6e945d3ae4d2f63c1357ff (diff)
downloadbcm5719-llvm-6c1ed31b3b94f97723ef870c9e633268580b80f3.tar.gz
bcm5719-llvm-6c1ed31b3b94f97723ef870c9e633268580b80f3.zip
Print variable's inline location in debug output.
llvm-svn: 137096
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugVariables.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp
index 7174bddfb51..89813e5a117 100644
--- a/llvm/lib/CodeGen/LiveDebugVariables.cpp
+++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp
@@ -25,6 +25,7 @@
#include "llvm/Constants.h"
#include "llvm/Metadata.h"
#include "llvm/Value.h"
+#include "llvm/Analysis/DebugInfo.h"
#include "llvm/ADT/IntervalMap.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
@@ -317,8 +318,10 @@ public:
} // namespace
void UserValue::print(raw_ostream &OS, const TargetMachine *TM) {
- if (const MDString *MDS = dyn_cast<MDString>(variable->getOperand(2)))
- OS << "!\"" << MDS->getString() << "\"\t";
+ DIVariable DV(variable);
+ OS << "!\"";
+ DV.printExtendedName(OS);
+ OS << "\"\t";
if (offset)
OS << '+' << offset;
for (LocMap::const_iterator I = locInts.begin(); I.valid(); ++I) {
OpenPOWER on IntegriCloud