summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-03-10 17:45:15 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-03-10 17:45:15 +0000
commitea5b2dd11c0526581803e7eb58224a2eabf191e6 (patch)
tree231646bba785a129b3a2d409badb74e7ccd1594c /lib/CodeGen/MachineBasicBlock.cpp
parentf5a3459adfde823bc7617f8ecfdd9fbc5a1ffadf (diff)
Notes
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp
index 64134ce59e95..32b1a7d728e1 100644
--- a/lib/CodeGen/MachineBasicBlock.cpp
+++ b/lib/CodeGen/MachineBasicBlock.cpp
@@ -42,12 +42,11 @@ MachineBasicBlock::~MachineBasicBlock() {
/// getSymbol - Return the MCSymbol for this basic block.
///
MCSymbol *MachineBasicBlock::getSymbol(MCContext &Ctx) const {
- SmallString<60> Name;
const MachineFunction *MF = getParent();
- raw_svector_ostream(Name)
- << MF->getTarget().getMCAsmInfo()->getPrivateGlobalPrefix() << "BB"
- << MF->getFunctionNumber() << '_' << getNumber();
- return Ctx.GetOrCreateSymbol(Name.str());
+ const char *Prefix = MF->getTarget().getMCAsmInfo()->getPrivateGlobalPrefix();
+ return Ctx.GetOrCreateTemporarySymbol(Twine(Prefix) + "BB" +
+ Twine(MF->getFunctionNumber()) + "_" +
+ Twine(getNumber()));
}