Use utostr from StringExtras.h instead of ostringstream from <sstream>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37731 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2007-06-26 15:14:48 +00:00
parent 798cb2ab82
commit acaf32e236

View File

@ -11,10 +11,10 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/ValueTypes.h" #include "llvm/CodeGen/ValueTypes.h"
#include "llvm/Type.h" #include "llvm/Type.h"
#include "llvm/DerivedTypes.h" #include "llvm/DerivedTypes.h"
#include <sstream>
using namespace llvm; using namespace llvm;
/// MVT::getValueTypeString - This function returns value type as a string, /// MVT::getValueTypeString - This function returns value type as a string,
@ -22,12 +22,9 @@ using namespace llvm;
std::string MVT::getValueTypeString(MVT::ValueType VT) { std::string MVT::getValueTypeString(MVT::ValueType VT) {
switch (VT) { switch (VT) {
default: default:
if (isExtendedValueType(VT)) { if (isExtendedValueType(VT))
std::ostringstream OS; return "v" + utostr(getVectorNumElements(VT)) +
OS << "v" << getVectorNumElements(VT) getValueTypeString(getVectorElementType(VT));
<< getValueTypeString(getVectorElementType(VT));
return OS.str();
}
assert(0 && "Invalid ValueType!"); assert(0 && "Invalid ValueType!");
case MVT::i1: return "i1"; case MVT::i1: return "i1";
case MVT::i8: return "i8"; case MVT::i8: return "i8";