summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GuardWidening.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2017-07-31 10:07:49 +0000
committerFlorian Hahn <florian.hahn@arm.com>2017-07-31 10:07:49 +0000
commit6b3216aad8e2125fe57a66bae9c163c41759664b (patch)
treee85f76b8e15bcaf8ff77b177c1afbf20b75cb552 /llvm/lib/Transforms/Scalar/GuardWidening.cpp
parentb4b4c0ae17a3ded41914cddb9285d11339dca2bc (diff)
downloadbcm5719-llvm-6b3216aad8e2125fe57a66bae9c163c41759664b.tar.gz
bcm5719-llvm-6b3216aad8e2125fe57a66bae9c163c41759664b.zip
Guard print() functions only used by dump() functions.
Summary: Since r293359, most dump() function are only defined when `!defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` holds. print() functions only used by dump() functions are now unused in release builds, generating lots of warnings. This patch only defines some print() functions if they are used. Reviewers: MatzeB Reviewed By: MatzeB Subscribers: arsenm, mzolotukhin, nhaehnle, llvm-commits Differential Revision: https://reviews.llvm.org/D35949 llvm-svn: 309553
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GuardWidening.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GuardWidening.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GuardWidening.cpp b/llvm/lib/Transforms/Scalar/GuardWidening.cpp
index fb7c6e15758..c4aeccb85ca 100644
--- a/llvm/lib/Transforms/Scalar/GuardWidening.cpp
+++ b/llvm/lib/Transforms/Scalar/GuardWidening.cpp
@@ -664,6 +664,7 @@ PreservedAnalyses GuardWideningPass::run(Function &F,
return PA;
}
+#ifndef NDEBUG
StringRef GuardWideningImpl::scoreTypeToString(WideningScore WS) {
switch (WS) {
case WS_IllegalOrNegative:
@@ -678,6 +679,7 @@ StringRef GuardWideningImpl::scoreTypeToString(WideningScore WS) {
llvm_unreachable("Fully covered switch above!");
}
+#endif
char GuardWideningLegacyPass::ID = 0;
OpenPOWER on IntegriCloud