mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
add a new CreateTempSymbol method, the use case for
CreateTempSymbol vs GetOrCreateTemporarySymbol are completely different. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d9aaba84e
commit
1d72a76616
@ -55,6 +55,10 @@ namespace llvm {
|
||||
|
||||
/// @name Symbol Managment
|
||||
/// @{
|
||||
|
||||
/// CreateTempSymbol - Create and return a new assembler temporary symbol
|
||||
/// with a unique but unspecified name.
|
||||
MCSymbol *CreateTempSymbol();
|
||||
|
||||
/// GetOrCreateSymbol - Lookup the symbol inside with the specified
|
||||
/// @p Name. If it exists, return it. If not, create a forward
|
||||
|
@ -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++));
|
||||
|
Loading…
Reference in New Issue
Block a user