aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-02 17:37:38 +0000
committerChris Lattner <sabre@nondot.org>2009-09-02 17:37:38 +0000
commit3bd52827bd65bdb5d6b6440a5fce0747eb414a60 (patch)
treead52d6872d80635c1777e4daea7735e444b031d2
parent522e9a0435ebba7b25802992031d0657654c281c (diff)
downloadexternal_llvm-3bd52827bd65bdb5d6b6440a5fce0747eb414a60.zip
external_llvm-3bd52827bd65bdb5d6b6440a5fce0747eb414a60.tar.gz
external_llvm-3bd52827bd65bdb5d6b6440a5fce0747eb414a60.tar.bz2
switch from std::string to SmallString + raw_svector_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80807 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/AsmPrinter/X86MCInstLower.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
index 09e4937..2f0b959 100644
--- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
+++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
@@ -22,22 +22,20 @@
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Mangler.h"
#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringExtras.h" // fixme, kill utostr.
-
using namespace llvm;
MCSymbol *X86ATTAsmPrinter::GetPICBaseSymbol() {
// FIXME: the actual label generated doesn't matter here! Just mangle in
// something unique (the function number) with Private prefix.
- std::string Name;
+ SmallString<60> Name;
if (Subtarget->isTargetDarwin()) {
- Name = "L" + utostr(getFunctionNumber())+"$pb";
+ raw_svector_ostream(Name) << 'L' << getFunctionNumber() << "$pb";
} else {
assert(Subtarget->isTargetELF() && "Don't know how to print PIC label!");
- Name = ".Lllvm$" + utostr(getFunctionNumber())+".$piclabel";
- }
- return OutContext.GetOrCreateSymbol(Name);
+ raw_svector_ostream(Name) << ".Lllvm$" << getFunctionNumber()<<".$piclabel";
+ }
+ return OutContext.GetOrCreateSymbol(StringRef(Name.data(), Name.size()));
}