summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-25 22:08:21 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-25 22:08:21 +0000
commit89c1eaa5317ad5abea69e973d2485ca1ab790975 (patch)
tree96dc23f7335d08b32e6429de74cccf0698b9885f
parentac10b0d61da71ff72fe167e6e29f0dd2e8043131 (diff)
downloadbcm5719-llvm-89c1eaa5317ad5abea69e973d2485ca1ab790975.tar.gz
bcm5719-llvm-89c1eaa5317ad5abea69e973d2485ca1ab790975.zip
IR: Annotate dump methods with LLVM_DUMP_METHOD
It turns out we have a macro to ensure that debuggers can access `dump()` methods. Use it. Hopefully this will prevent me (and others) from committing crimes like in r223802 (search for /10000/, or just see the fix in r224407). llvm-svn: 230555
-rw-r--r--llvm/lib/IR/AsmWriter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 104ad4f0be3..dccbfe47dd2 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -3214,20 +3214,26 @@ void Metadata::printAsOperand(raw_ostream &ROS, bool PrintType,
}
// Value::dump - allow easy printing of Values from the debugger.
+LLVM_DUMP_METHOD
void Value::dump() const { print(dbgs()); dbgs() << '\n'; }
// Type::dump - allow easy printing of Types from the debugger.
+LLVM_DUMP_METHOD
void Type::dump() const { print(dbgs()); dbgs() << '\n'; }
// Module::dump() - Allow printing of Modules from the debugger.
+LLVM_DUMP_METHOD
void Module::dump() const { print(dbgs(), nullptr); }
// \brief Allow printing of Comdats from the debugger.
+LLVM_DUMP_METHOD
void Comdat::dump() const { print(dbgs()); }
// NamedMDNode::dump() - Allow printing of NamedMDNodes from the debugger.
+LLVM_DUMP_METHOD
void NamedMDNode::dump() const { print(dbgs()); }
+LLVM_DUMP_METHOD
void Metadata::dump() const {
print(dbgs());
dbgs() << '\n';
OpenPOWER on IntegriCloud