summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-01-03 22:53:37 +0000
committerNico Weber <nicolasweber@gmx.de>2014-01-03 22:53:37 +0000
commit7408c7066a0caad2b2871614ce5f651822d42667 (patch)
tree46c4d102f933892442c48e276b405add37102784 /llvm/lib/CodeGen
parent5b3d51c7fbcaa2b3a7bb9ab157891329dadfd783 (diff)
downloadbcm5719-llvm-7408c7066a0caad2b2871614ce5f651822d42667.tar.gz
bcm5719-llvm-7408c7066a0caad2b2871614ce5f651822d42667.zip
Add a LLVM_DUMP_METHOD macro.
The motivation is to mark dump methods as used in debug builds so that they can be called from lldb, but to not do so in release builds so that they can be dead-stripped. There's lots of potential follow-up work suggested in the thread "Should dump methods be LLVM_ATTRIBUTE_USED only in debug builds?" on cfe-dev, but everyone seems to agreen on this subset. Macro name chosen by fair coin toss. llvm-svn: 198456
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineBlockPlacement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
index f297c5f6786..760033fff13 100644
--- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -152,7 +152,7 @@ public:
#ifndef NDEBUG
/// \brief Dump the blocks in this chain.
- void dump() LLVM_ATTRIBUTE_USED {
+ LLVM_DUMP_METHOD void dump() {
for (iterator I = begin(), E = end(); I != E; ++I)
(*I)->dump();
}
OpenPOWER on IntegriCloud