aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfException.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-09-01 18:49:12 +0000
committerJim Grosbach <grosbach@apple.com>2009-09-01 18:49:12 +0000
commitc40d9f9bae70c83947bf8fa5f9ee97adbf1bb0c0 (patch)
tree5ffd5d07fdabfc98161e5ff9ef781a0b830fa062 /lib/CodeGen/AsmPrinter/DwarfException.cpp
parent81dfb3885252fbf621b080827a080099864415f8 (diff)
Use raw_ostream instead of sstream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 6d6af83bd2..8e0485e8cf 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -28,8 +28,8 @@
#include "llvm/Support/Mangler.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
-#include <sstream>
using namespace llvm;
static TimerGroup &getDwarfTimerGroup() {
@@ -601,12 +601,10 @@ void DwarfException::EmitExceptionTable() {
EmitLabel("exception", SubprogramCount);
if (MAI->getExceptionHandlingType() == ExceptionHandling::SjLj) {
- std::stringstream out;
- out << Asm->getFunctionNumber();
- std::string LSDAName =
- Asm->Mang->makeNameProper(std::string("LSDA_") + out.str(),
- Mangler::Private);
- O << LSDAName << ":\n";
+ SmallString<256> LSDAName;
+ raw_svector_ostream(LSDAName) << MAI->getPrivateGlobalPrefix() <<
+ "_LSDA_" << Asm->getFunctionNumber();
+ O << LSDAName.str() << ":\n";
}
// Emit the header.