summaryrefslogtreecommitdiff
path: root/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
commita2b552d0aec83b1d030b878a130c8fefafe4d3c3 (patch)
treea08f9e90c63c2b44ec1273a53838dc9e41cfc91a /lib/CodeGen/LiveDebugVariables.cpp
parent48d726fbce7a70a2f5d7752c883731efe1e5e1c9 (diff)
downloadllvm-a2b552d0aec83b1d030b878a130c8fefafe4d3c3.tar.gz
llvm-a2b552d0aec83b1d030b878a130c8fefafe4d3c3.tar.bz2
llvm-a2b552d0aec83b1d030b878a130c8fefafe4d3c3.tar.xz
Print variable's inline location in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--lib/CodeGen/LiveDebugVariables.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveDebugVariables.cpp b/lib/CodeGen/LiveDebugVariables.cpp
index 7174bddfb5..89813e5a11 100644
--- a/lib/CodeGen/LiveDebugVariables.cpp
+++ b/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) {