mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Fix the AsmWriter to not print extra spaces after parameter attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f613f30a7
commit
c3be0fd8c3
@ -1385,7 +1385,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
|
||||
Out << " )";
|
||||
if (PAL.getParamAttrs(0) != ParamAttr::None)
|
||||
Out << " " << ParamAttr::getAsString(PAL.getParamAttrs(0));
|
||||
Out << ' ' << ParamAttr::getAsString(PAL.getParamAttrs(0));
|
||||
Out << "\n\t\t\tto";
|
||||
writeOperand(II->getNormalDest(), true);
|
||||
Out << " unwind";
|
||||
|
@ -52,6 +52,8 @@ std::string ParamAttr::getAsString(ParameterAttributes Attrs) {
|
||||
Result += utostr((Attrs & ParamAttr::Alignment) >> 16);
|
||||
Result += " ";
|
||||
}
|
||||
// Trim the trailing space.
|
||||
Result.erase(Result.end()-1);
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -404,18 +404,18 @@ void Verifier::VerifyAttrs(ParameterAttributes Attrs, const Type *Ty,
|
||||
if (isReturnValue) {
|
||||
ParameterAttributes RetI = Attrs & ParamAttr::ParameterOnly;
|
||||
Assert1(!RetI, "Attribute " + ParamAttr::getAsString(RetI) +
|
||||
"does not apply to return values!", V);
|
||||
" does not apply to return values!", V);
|
||||
} else {
|
||||
ParameterAttributes ParmI = Attrs & ParamAttr::ReturnOnly;
|
||||
Assert1(!ParmI, "Attribute " + ParamAttr::getAsString(ParmI) +
|
||||
"only applies to return values!", V);
|
||||
" only applies to return values!", V);
|
||||
}
|
||||
|
||||
for (unsigned i = 0;
|
||||
i < array_lengthof(ParamAttr::MutuallyIncompatible); ++i) {
|
||||
ParameterAttributes MutI = Attrs & ParamAttr::MutuallyIncompatible[i];
|
||||
Assert1(!(MutI & (MutI - 1)), "Attributes " +
|
||||
ParamAttr::getAsString(MutI) + "are incompatible!", V);
|
||||
ParamAttr::getAsString(MutI) + " are incompatible!", V);
|
||||
}
|
||||
|
||||
ParameterAttributes TypeI = Attrs & ParamAttr::typeIncompatible(Ty);
|
||||
@ -931,7 +931,7 @@ void Verifier::VerifyCallSite(CallSite CS) {
|
||||
|
||||
ParameterAttributes VArgI = Attr & ParamAttr::VarArgsIncompatible;
|
||||
Assert1(!VArgI, "Attribute " + ParamAttr::getAsString(VArgI) +
|
||||
"cannot be used for vararg call arguments!", I);
|
||||
" cannot be used for vararg call arguments!", I);
|
||||
}
|
||||
|
||||
visitInstruction(*I);
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | grep {tail call void.*sret null}
|
||||
; RUN: llvm-as < %s | llvm-dis | grep {tail call void.*sret null}
|
||||
|
||||
declare void @foo({ }* sret , ...)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user