diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-01-03 22:53:37 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-01-03 22:53:37 +0000 |
commit | c3d3f0c696f4da72e4107aa26c416676b9bc8ac2 (patch) | |
tree | d9cd1f8eb307d9a2eff73803b295e5fecff8413c /lib/CodeGen | |
parent | 8ff286445030634b2aba04d7ecd79814a1712a03 (diff) | |
download | llvm-c3d3f0c696f4da72e4107aa26c416676b9bc8ac2.tar.gz llvm-c3d3f0c696f4da72e4107aa26c416676b9bc8ac2.tar.bz2 llvm-c3d3f0c696f4da72e4107aa26c416676b9bc8ac2.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineBlockPlacement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp index f297c5f678..760033fff1 100644 --- a/lib/CodeGen/MachineBlockPlacement.cpp +++ b/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(); } |