diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-09 06:17:21 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-09 06:17:21 +0000 |
commit | 71b79e3d99f9d624c0674ddf45837ede197eac3b (patch) | |
tree | d5319155e12f44cd1ccd9af06b233a726a7cebca /llvm/lib/Target/MSIL/MSILWriter.cpp | |
parent | f51a7050dd8c93cab5743598d944d353013d870b (diff) | |
download | bcm5719-llvm-71b79e3d99f9d624c0674ddf45837ede197eac3b.tar.gz bcm5719-llvm-71b79e3d99f9d624c0674ddf45837ede197eac3b.zip |
For PR1146:
Adapt handling of parameter attributes to use the new ParamAttrsList class.
llvm-svn: 35814
Diffstat (limited to 'llvm/lib/Target/MSIL/MSILWriter.cpp')
-rw-r--r-- | llvm/lib/Target/MSIL/MSILWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/MSIL/MSILWriter.cpp b/llvm/lib/Target/MSIL/MSILWriter.cpp index bab2904bd18..3aa05e4db8a 100644 --- a/llvm/lib/Target/MSIL/MSILWriter.cpp +++ b/llvm/lib/Target/MSIL/MSILWriter.cpp @@ -16,6 +16,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Intrinsics.h" #include "llvm/IntrinsicInst.h" +#include "llvm/ParameterAttributes.h" #include "llvm/TypeSymbolTable.h" #include "llvm/Analysis/ConstantsScanner.h" #include "llvm/Support/CallSite.h" @@ -1131,7 +1132,8 @@ void MSILWriter::printStaticInitializerList() { void MSILWriter::printFunction(const Function& F) { const FunctionType* FTy = F.getFunctionType(); - bool isSigned = FTy->paramHasAttr(0,FunctionType::SExtAttribute); + const ParamAttrsList *Attrs = FTy->getParamAttrs(); + bool isSigned = Attrs && Attrs->paramHasAttr(0, SExtAttribute); Out << "\n.method static "; Out << (F.hasInternalLinkage() ? "private " : "public "); if (F.isVarArg()) Out << "vararg "; @@ -1142,7 +1144,7 @@ void MSILWriter::printFunction(const Function& F) { unsigned ArgIdx = 1; for (Function::const_arg_iterator I = F.arg_begin(), E = F.arg_end(); I!=E; ++I, ++ArgIdx) { - isSigned = FTy->paramHasAttr(ArgIdx,FunctionType::SExtAttribute); + isSigned = Attrs && Attrs->paramHasAttr(ArgIdx, SExtAttribute); if (I!=F.arg_begin()) Out << ", "; Out << getTypeName(I->getType(),isSigned) << getValueName(I); } |