Add a LLVM_DUMP_METHOD macro.
authorNico Weber <nicolasweber@gmx.de>
Fri, 3 Jan 2014 22:53:37 +0000 (22:53 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 3 Jan 2014 22:53:37 +0000 (22:53 +0000)
commit7408c7066a0caad2b2871614ce5f651822d42667
tree46c4d102f933892442c48e276b405add37102784
parent5b3d51c7fbcaa2b3a7bb9ab157891329dadfd783
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
llvm/include/llvm/Support/Compiler.h
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/lib/Transforms/Scalar/SROA.cpp