From acaf32e2363ac2e57da52c49af803204dcda48ed Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 26 Jun 2007 15:14:48 +0000 Subject: [PATCH] Use utostr from StringExtras.h instead of ostringstream from . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37731 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/ValueTypes.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp index 751bd588f66..7472f888e16 100644 --- a/lib/VMCore/ValueTypes.cpp +++ b/lib/VMCore/ValueTypes.cpp @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Type.h" #include "llvm/DerivedTypes.h" -#include using namespace llvm; /// MVT::getValueTypeString - This function returns value type as a string, @@ -22,12 +22,9 @@ using namespace llvm; std::string MVT::getValueTypeString(MVT::ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) { - std::ostringstream OS; - OS << "v" << getVectorNumElements(VT) - << getValueTypeString(getVectorElementType(VT)); - return OS.str(); - } + if (isExtendedValueType(VT)) + return "v" + utostr(getVectorNumElements(VT)) + + getValueTypeString(getVectorElementType(VT)); assert(0 && "Invalid ValueType!"); case MVT::i1: return "i1"; case MVT::i8: return "i8"; -- 2.34.1