[llvm-commits] [llvm] r46569 - /llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Dale Johannesen
dalej at apple.com
Wed Jan 30 11:44:39 PST 2008
Author: johannes
Date: Wed Jan 30 13:44:39 2008
New Revision: 46569
URL: http://llvm.org/viewvc/llvm-project?rev=46569&view=rev
Log:
Adjust loop per review feedback.
Modified:
llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=46569&r1=46568&r2=46569&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Wed Jan 30 13:44:39 2008
@@ -106,8 +106,7 @@
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 @@
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));
More information about the llvm-commits
mailing list