summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-02-29 22:28:22 +0000
committerAdrian Prantl <aprantl@apple.com>2016-02-29 22:28:22 +0000
commitdba58fbdd9ddb656f23aa8d8b6e86d4747991063 (patch)
tree0661d197ca6815d78476c7a51b528727c2d962b4 /llvm/lib/CodeGen/AsmPrinter
parenta349714bf9cd61b0d3aa0254891a0674c974113f (diff)
downloadbcm5719-llvm-dba58fbdd9ddb656f23aa8d8b6e86d4747991063.tar.gz
bcm5719-llvm-dba58fbdd9ddb656f23aa8d8b6e86d4747991063.zip
Improve the debug output of DwarfDebug::buildLocationList().
llvm-svn: 262265
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h14
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
2 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
index b60ab9151ef..b09708159a1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
@@ -76,6 +76,20 @@ public:
const DIExpression *getExpression() const { return Expression; }
friend bool operator==(const Value &, const Value &);
friend bool operator<(const Value &, const Value &);
+ void dump() const {
+ if (isLocation()) {
+ llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " ";
+ if (Loc.isIndirect())
+ llvm::dbgs() << '+' << Loc.getOffset();
+ llvm::dbgs() << "} ";
+ }
+ else if (isConstantInt())
+ Constant.CIP->dump();
+ else if (isConstantFP())
+ Constant.CFP->dump();
+ if (Expression)
+ Expression->dump();
+ }
};
private:
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 87e886662f9..d4d94cabe83 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -916,7 +916,7 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
DEBUG({
dbgs() << CurEntry->getValues().size() << " Values:\n";
for (auto &Value : CurEntry->getValues())
- Value.getExpression()->dump();
+ Value.dump();
dbgs() << "-----\n";
});
OpenPOWER on IntegriCloud