summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 08:23:30 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 08:23:30 +0000
commit073d817958e115d695af507457ac9c43cac81953 (patch)
tree3f873f72e4baf8e0067f94666c39e04dc8b987f7 /llvm/lib/MC/MCContext.cpp
parent6dcaba516fe7d4ecd4f9aaeb562962484c49ea07 (diff)
downloadbcm5719-llvm-073d817958e115d695af507457ac9c43cac81953.tar.gz
bcm5719-llvm-073d817958e115d695af507457ac9c43cac81953.zip
add a new CreateTempSymbol method, the use case for
CreateTempSymbol vs GetOrCreateTemporarySymbol are completely different. llvm-svn: 98486
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 78d6a77dfb8..ae9a30a95f4 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -37,9 +37,15 @@ MCSymbol *MCContext::GetOrCreateSymbol(const Twine &Name) {
return GetOrCreateSymbol(NameSV.str());
}
+MCSymbol *MCContext::CreateTempSymbol() {
+ return GetOrCreateTemporarySymbol(Twine(MAI.getPrivateGlobalPrefix()) +
+ "tmp" + Twine(NextUniqueID++));
+}
+
MCSymbol *MCContext::GetOrCreateTemporarySymbol(StringRef Name) {
// If there is no name, create a new anonymous symbol.
+ // FIXME: Remove this. This form of the method should always take a name.
if (Name.empty())
return GetOrCreateTemporarySymbol(Twine(MAI.getPrivateGlobalPrefix()) +
"tmp" + Twine(NextUniqueID++));
OpenPOWER on IntegriCloud