mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
add trivial support for passing label definitions through the MCStreamer.
This is suboptimal in several aspects, see the commented out assertion. I need to talk to Daniel about this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -44,6 +44,20 @@ MCSymbol *MCContext::CreateSymbol(MCAtom *Atom, const char *Name) {
|
||||
return Entry = new (*this) MCSymbol(Atom, Name, false);
|
||||
}
|
||||
|
||||
/// GetOrCreateSymbol - Lookup the symbol inside with the specified
|
||||
/// @param Name. If it exists, return it. If not, create a forward
|
||||
/// reference and return it.
|
||||
///
|
||||
/// @param Name - The symbol name, which must be unique across all symbols.
|
||||
MCSymbol *MCContext::GetOrCreateSymbol(const char *Name) {
|
||||
MCSymbol *&Entry = Symbols[Name];
|
||||
if (Entry) return Entry;
|
||||
|
||||
// FIXME: is a null atom the right way to make a forward ref?
|
||||
return Entry = new (*this) MCSymbol(0, Name, false);
|
||||
}
|
||||
|
||||
|
||||
MCSymbol *MCContext::CreateTemporarySymbol(MCAtom *Atom, const char *Name) {
|
||||
// If unnamed, just create a symbol.
|
||||
if (Name[0] == '\0')
|
||||
|
Reference in New Issue
Block a user