mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
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
This commit is contained in:
parent
ca9f7efdf8
commit
3432d70d5b
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user