[llvm-commits] [llvm] r54351 - in /llvm/trunk: lib/VMCore/AsmWriter.cpp lib/VMCore/ParameterAttributes.cpp lib/VMCore/Verifier.cpp test/Assembler/2006-05-26-VarargsCallEncode.ll
Dan Gohman
gohman at apple.com
Tue Aug 5 08:51:47 PDT 2008
Author: djg
Date: Tue Aug 5 10:51:44 2008
New Revision: 54351
URL: http://llvm.org/viewvc/llvm-project?rev=54351&view=rev
Log:
Fix the AsmWriter to not print extra spaces after parameter attributes.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
llvm/trunk/lib/VMCore/ParameterAttributes.cpp
llvm/trunk/lib/VMCore/Verifier.cpp
llvm/trunk/test/Assembler/2006-05-26-VarargsCallEncode.ll
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=54351&r1=54350&r2=54351&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Aug 5 10:51:44 2008
@@ -1385,7 +1385,7 @@
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";
Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ParameterAttributes.cpp?rev=54351&r1=54350&r2=54351&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ParameterAttributes.cpp (original)
+++ llvm/trunk/lib/VMCore/ParameterAttributes.cpp Tue Aug 5 10:51:44 2008
@@ -52,6 +52,8 @@
Result += utostr((Attrs & ParamAttr::Alignment) >> 16);
Result += " ";
}
+ // Trim the trailing space.
+ Result.erase(Result.end()-1);
return Result;
}
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=54351&r1=54350&r2=54351&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Aug 5 10:51:44 2008
@@ -404,18 +404,18 @@
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 @@
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);
Modified: llvm/trunk/test/Assembler/2006-05-26-VarargsCallEncode.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2006-05-26-VarargsCallEncode.ll?rev=54351&r1=54350&r2=54351&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2006-05-26-VarargsCallEncode.ll (original)
+++ llvm/trunk/test/Assembler/2006-05-26-VarargsCallEncode.ll Tue Aug 5 10:51:44 2008
@@ -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 , ...)
More information about the llvm-commits
mailing list