Fix the AsmWriter to not print extra spaces after parameter attributes.

llvm-svn: 54351
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 98c6fef..9a87b18 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -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";
diff --git a/llvm/lib/VMCore/ParameterAttributes.cpp b/llvm/lib/VMCore/ParameterAttributes.cpp
index b5fb832..d16f54d 100644
--- a/llvm/lib/VMCore/ParameterAttributes.cpp
+++ b/llvm/lib/VMCore/ParameterAttributes.cpp
@@ -52,6 +52,8 @@
     Result += utostr((Attrs & ParamAttr::Alignment) >> 16);
     Result += " ";
   }
+  // Trim the trailing space.
+  Result.erase(Result.end()-1);
   return Result;
 }
 
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 00a5870..c093274 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -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);