summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/BasicAliasAnalysis.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-06-29 10:03:11 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-06-29 10:03:11 +0000
commit3432d70d5b48164f0adaec0771c89c54408e2be9 (patch)
tree6932539b643eefc5576943944ba1d67e3df7a3ed /lib/Analysis/BasicAliasAnalysis.cpp
parentca9f7efdf8eeffcabd95609c3bb7d481164a0d79 (diff)
downloadexternal_llvm-3432d70d5b48164f0adaec0771c89c54408e2be9.zip
external_llvm-3432d70d5b48164f0adaec0771c89c54408e2be9.tar.gz
external_llvm-3432d70d5b48164f0adaec0771c89c54408e2be9.tar.bz2
Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 7a334ff..e6e9e36 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -29,7 +29,6 @@
#include "llvm/Target/TargetData.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
using namespace llvm;
@@ -198,6 +197,7 @@ ImmutablePass *llvm::createNoAAPass() { return new NoAA(); }
// BasicAliasAnalysis Pass
//===----------------------------------------------------------------------===//
+#ifdef XDEBUG
static const Function *getParent(const Value *V) {
if(const Instruction *inst = dyn_cast<Instruction>(V))
return inst->getParent()->getParent();
@@ -208,8 +208,6 @@ static const Function *getParent(const Value *V) {
return NULL;
}
-static bool sameParent(const Value *O1, const Value *O2) ATTRIBUTE_UNUSED;
-
static bool sameParent(const Value *O1, const Value *O2) {
const Function *F1 = getParent(O1);
@@ -217,6 +215,7 @@ static bool sameParent(const Value *O1, const Value *O2) {
return !F1 || !F2 || F1 == F2;
}
+#endif
namespace {
/// BasicAliasAnalysis - This is the default alias analysis implementation.