[llvm-commits] [llvm] r44433 - /llvm/trunk/lib/VMCore/Instructions.cpp
Duncan Sands
baldrick at free.fr
Thu Nov 29 00:30:15 PST 2007
Author: baldrick
Date: Thu Nov 29 02:30:15 2007
New Revision: 44433
URL: http://llvm.org/viewvc/llvm-project?rev=44433&view=rev
Log:
Small parameter attributes cleanup.
Modified:
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=44433&r1=44432&r2=44433&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Thu Nov 29 02:30:15 2007
@@ -385,8 +385,9 @@
bool CallInst::paramHasAttr(uint16_t i, ParameterAttributes attr) const {
if (ParamAttrs && ParamAttrs->paramHasAttr(i, attr))
return true;
- const Function *F = getCalledFunction();
- return F && F->getParamAttrs() && F->getParamAttrs()->paramHasAttr(i, attr);
+ if (const Function *F = getCalledFunction())
+ return F->paramHasAttr(i, attr);
+ return false;
}
@@ -462,8 +463,9 @@
bool InvokeInst::paramHasAttr(uint16_t i, ParameterAttributes attr) const {
if (ParamAttrs && ParamAttrs->paramHasAttr(i, attr))
return true;
- const Function *F = getCalledFunction();
- return F && F->getParamAttrs() && F->getParamAttrs()->paramHasAttr(i, attr);
+ if (const Function *F = getCalledFunction())
+ return F->paramHasAttr(i, attr);
+ return false;
}
More information about the llvm-commits
mailing list