diff options
author | Don Hinton <hintonda@gmail.com> | 2017-10-12 16:16:06 +0000 |
---|---|---|
committer | Don Hinton <hintonda@gmail.com> | 2017-10-12 16:16:06 +0000 |
commit | 3e0199f7ebab06654168e72add49b7f8eed75b27 (patch) | |
tree | c50690f9c8f9ff646b035e30b5840f36c5b169eb /llvm/lib/Support | |
parent | 3a72909b7ed7ba81fab3e7a0ed3bfb98ee070418 (diff) | |
download | bcm5719-llvm-3e0199f7ebab06654168e72add49b7f8eed75b27.tar.gz bcm5719-llvm-3e0199f7ebab06654168e72add49b7f8eed75b27.zip |
[dump] Remove NDEBUG from test to enable dump methods [NFC]
Summary:
Add LLVM_FORCE_ENABLE_DUMP cmake option, and use it along with
LLVM_ENABLE_ASSERTIONS to set LLVM_ENABLE_DUMP.
Remove NDEBUG and only use LLVM_ENABLE_DUMP to enable dump methods.
Move definition of LLVM_ENABLE_DUMP from config.h to llvm-config.h so
it'll be picked up by public headers.
Differential Revision: https://reviews.llvm.org/D38406
llvm-svn: 315590
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/BranchProbability.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Twine.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index f835bd1fbd2..3a13ac506aa 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -4486,7 +4486,7 @@ void APFloat::print(raw_ostream &OS) const { OS << Buffer << "\n"; } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#ifdef LLVM_ENABLE_DUMP LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); } #endif diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index c558ddd8216..cd6c653e18e 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -2120,7 +2120,7 @@ std::string APInt::toString(unsigned Radix = 10, bool Signed = true) const { return S.str(); } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#ifdef LLVM_ENABLE_DUMP LLVM_DUMP_METHOD void APInt::dump() const { SmallString<40> S, U; this->toStringUnsigned(U); diff --git a/llvm/lib/Support/BranchProbability.cpp b/llvm/lib/Support/BranchProbability.cpp index 44ad110d456..862f910a514 100644 --- a/llvm/lib/Support/BranchProbability.cpp +++ b/llvm/lib/Support/BranchProbability.cpp @@ -32,7 +32,7 @@ raw_ostream &BranchProbability::print(raw_ostream &OS) const { Percent); } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#ifdef LLVM_ENABLE_DUMP LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; } #endif diff --git a/llvm/lib/Support/Twine.cpp b/llvm/lib/Support/Twine.cpp index d17cd4e6643..caaddd17b23 100644 --- a/llvm/lib/Support/Twine.cpp +++ b/llvm/lib/Support/Twine.cpp @@ -173,7 +173,7 @@ void Twine::printRepr(raw_ostream &OS) const { OS << ")"; } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#ifdef LLVM_ENABLE_DUMP LLVM_DUMP_METHOD void Twine::dump() const { print(dbgs()); } |