aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/MergeFunctions.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-04-28 19:39:45 +0000
committerDavide Italiano <davide@freebsd.org>2017-04-28 19:39:45 +0000
commitb6681e2b4e82cb11bd21a7cbf01abea165f32508 (patch)
tree0772ed6f4fac1f8ff845d436e0cdce04bce659ec /llvm/lib/Transforms/IPO/MergeFunctions.cpp
parent99351967c76cb32528890ad47fcb8946c1b83b78 (diff)
downloadllvm-b6681e2b4e82cb11bd21a7cbf01abea165f32508.zip
llvm-b6681e2b4e82cb11bd21a7cbf01abea165f32508.tar.gz
llvm-b6681e2b4e82cb11bd21a7cbf01abea165f32508.tar.bz2
[IPO/MergeFunctions] This function is used only under DEBUG().
llvm-svn: 301672
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/MergeFunctions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index 771770d..21bf149 100644
--- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -211,7 +211,9 @@ private:
/// Checks the rules of order relation introduced among functions set.
/// Returns true, if sanity check has been passed, and false if failed.
+#ifndef NDEBUG
bool doSanityCheck(std::vector<WeakVH> &Worklist);
+#endif
/// Insert a ComparableFunction into the FnTree, or merge it away if it's
/// equal to one that's already present.
@@ -283,6 +285,7 @@ ModulePass *llvm::createMergeFunctionsPass() {
return new MergeFunctions();
}
+#ifndef NDEBUG
bool MergeFunctions::doSanityCheck(std::vector<WeakVH> &Worklist) {
if (const unsigned Max = NumFunctionsForSanityCheck) {
unsigned TripleNumber = 0;
@@ -351,6 +354,7 @@ bool MergeFunctions::doSanityCheck(std::vector<WeakVH> &Worklist) {
}
return true;
}
+#endif
bool MergeFunctions::runOnModule(Module &M) {
if (skipModule(M))