summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
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/DebugLocEntry.h
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/DebugLocEntry.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h14
1 files changed, 14 insertions, 0 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:
OpenPOWER on IntegriCloud