From b6681e2b4e82cb11bd21a7cbf01abea165f32508 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Fri, 28 Apr 2017 19:39:45 +0000 Subject: [PATCH] [IPO/MergeFunctions] This function is used only under DEBUG(). llvm-svn: 301672 --- llvm/lib/Transforms/IPO/MergeFunctions.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index 771770ddc060..21bf149e7bc8 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 &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 &Worklist) { if (const unsigned Max = NumFunctionsForSanityCheck) { unsigned TripleNumber = 0; @@ -351,6 +354,7 @@ bool MergeFunctions::doSanityCheck(std::vector &Worklist) { } return true; } +#endif bool MergeFunctions::runOnModule(Module &M) { if (skipModule(M))