mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Wrap recursive function only used in assert in #ifndef NDEBUG.
Avoids unused function warnings in Release builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -146,6 +146,8 @@ static bool isLiveGCReferenceAt(Value &V, Instruction *loc, DominatorTree &DT,
|
|||||||
// Given assumption that V dominates loc, this may be live
|
// Given assumption that V dominates loc, this may be live
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
static bool isAggWhichContainsGCPtrType(Type *Ty) {
|
static bool isAggWhichContainsGCPtrType(Type *Ty) {
|
||||||
if (VectorType *VT = dyn_cast<VectorType>(Ty))
|
if (VectorType *VT = dyn_cast<VectorType>(Ty))
|
||||||
return isGCPointerType(VT->getScalarType());
|
return isGCPointerType(VT->getScalarType());
|
||||||
@ -155,11 +157,13 @@ static bool isAggWhichContainsGCPtrType(Type *Ty) {
|
|||||||
} else if (StructType *ST = dyn_cast<StructType>(Ty)) {
|
} else if (StructType *ST = dyn_cast<StructType>(Ty)) {
|
||||||
bool UnsupportedType = false;
|
bool UnsupportedType = false;
|
||||||
for (Type *SubType : ST->subtypes())
|
for (Type *SubType : ST->subtypes())
|
||||||
UnsupportedType |= isGCPointerType(SubType) || isAggWhichContainsGCPtrType(SubType);
|
UnsupportedType |=
|
||||||
|
isGCPointerType(SubType) || isAggWhichContainsGCPtrType(SubType);
|
||||||
return UnsupportedType;
|
return UnsupportedType;
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Conservatively identifies any definitions which might be live at the
|
// Conservatively identifies any definitions which might be live at the
|
||||||
// given instruction. The analysis is performed immediately before the
|
// given instruction. The analysis is performed immediately before the
|
||||||
|
Reference in New Issue
Block a user