[llvm-commits] [llvm] r107125 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Jun 29 03:03:11 PDT 2010
Author: d0k
Date: Tue Jun 29 05:03:11 2010
New Revision: 107125
URL: http://llvm.org/viewvc/llvm-project?rev=107125&view=rev
Log:
Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.
Modified:
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=107125&r1=107124&r2=107125&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Tue Jun 29 05:03:11 2010
@@ -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 @@
// 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 @@
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 @@
return !F1 || !F2 || F1 == F2;
}
+#endif
namespace {
/// BasicAliasAnalysis - This is the default alias analysis implementation.
More information about the llvm-commits
mailing list