mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Adjust loop per review feedback.
llvm-svn: 46569
This commit is contained in:
parent
07f3cd3242
commit
dce1b3cb2f
@ -106,8 +106,7 @@ static GlobalVariable *getGlobalVariable(Value *V) {
|
||||
return dyn_cast<GlobalVariable>(CE->getOperand(0));
|
||||
} else if (CE->getOpcode() == Instruction::GetElementPtr) {
|
||||
for (unsigned int i=1; i<CE->getNumOperands(); i++) {
|
||||
Constant* CI = cast<Constant>(CE->getOperand(i));
|
||||
if (!CI || !CI->isNullValue())
|
||||
if (!CE->getOperand(i)->isNullValue())
|
||||
return NULL;
|
||||
}
|
||||
return dyn_cast<GlobalVariable>(CE->getOperand(0));
|
||||
@ -126,8 +125,7 @@ static bool isGlobalVariable(Value *V) {
|
||||
return isa<GlobalVariable>(CE->getOperand(0));
|
||||
} else if (CE->getOpcode() == Instruction::GetElementPtr) {
|
||||
for (unsigned int i=1; i<CE->getNumOperands(); i++) {
|
||||
Constant* CI = cast<Constant>(CE->getOperand(i));
|
||||
if (!CI || !CI->isNullValue())
|
||||
if (!CE->getOperand(i)->isNullValue())
|
||||
return false;
|
||||
}
|
||||
return isa<GlobalVariable>(CE->getOperand(0));
|
||||
|
Loading…
Reference in New Issue
Block a user