Use utostr instead of a stringstream.
authorDan Gohman <gohman@apple.com>
Mon, 10 Mar 2008 23:55:07 +0000 (23:55 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 10 Mar 2008 23:55:07 +0000 (23:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48198 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ParameterAttributes.cpp

index 2f754306babb6dec19a080a65277b47b80ff6cac..bebee3e3d77e42e13469a0fec97173442641a1cd 100644 (file)
@@ -13,8 +13,8 @@
 
 #include "llvm/ParamAttrsList.h"
 #include "llvm/DerivedTypes.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/ManagedStatic.h"
-#include <sstream>
 
 using namespace llvm;
 
@@ -70,10 +70,8 @@ ParamAttrsList::getParamAttrsText(ParameterAttributes Attrs) {
   if (Attrs & ParamAttr::ReadOnly)
     Result += "readonly ";
   if (Attrs & ParamAttr::Alignment) {
-    std::stringstream s;
-    s << ((Attrs & ParamAttr::Alignment) >> 16);
     Result += "align ";
-    Result += s.str();
+    Result += utostr((Attrs & ParamAttr::Alignment) >> 16);
     Result += " ";
   }
   return Result;