[llvm-commits] [llvm] r137096 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Devang Patel
dpatel at apple.com
Mon Aug 8 18:03:35 PDT 2011
Author: dpatel
Date: Mon Aug 8 20:03:35 2011
New Revision: 137096
URL: http://llvm.org/viewvc/llvm-project?rev=137096&view=rev
Log:
Print variable's inline location in debug output.
Modified:
llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=137096&r1=137095&r2=137096&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Mon Aug 8 20:03:35 2011
@@ -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 @@
} // 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) {
More information about the llvm-commits
mailing list