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 | 5694b6e90eaf94fa7a21f101a8e4424d813a85ce (patch) | |
tree | 98d20adc25b36faa5f6fe589d942cf04173281d3 /lib/Target/MSIL/MSILWriter.cpp | |
parent | 7b5d466c88aacdf1c11a1651a00d2c0fa29fb4d6 (diff) |
For PR1146:
Adapt handling of parameter attributes to use the new ParamAttrsList class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSIL/MSILWriter.cpp')
-rw-r--r-- | lib/Target/MSIL/MSILWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index bab2904bd1..3aa05e4db8 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/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); } |