mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-23 01:30:19 +00:00
Fix a false-positive warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123480 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ca5f616769
commit
e95a32ce40
@ -2143,7 +2143,7 @@ static bool isSimpleEnoughPointerToCommit(Constant *C) {
|
|||||||
// external globals.
|
// external globals.
|
||||||
return GV->hasUniqueInitializer();
|
return GV->hasUniqueInitializer();
|
||||||
|
|
||||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
|
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
|
||||||
// Handle a constantexpr gep.
|
// Handle a constantexpr gep.
|
||||||
if (CE->getOpcode() == Instruction::GetElementPtr &&
|
if (CE->getOpcode() == Instruction::GetElementPtr &&
|
||||||
isa<GlobalVariable>(CE->getOperand(0)) &&
|
isa<GlobalVariable>(CE->getOperand(0)) &&
|
||||||
@ -2179,6 +2179,8 @@ static bool isSimpleEnoughPointerToCommit(Constant *C) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user