mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
MC: Reject attempts to define a variable symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103111 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -218,6 +218,7 @@ void MCAsmStreamer::SwitchSection(const MCSection *Section) {
|
||||
|
||||
void MCAsmStreamer::EmitLabel(MCSymbol *Symbol) {
|
||||
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
|
||||
assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
|
||||
assert(CurSection && "Cannot emit before setting section!");
|
||||
|
||||
OS << *Symbol << ":";
|
||||
@@ -234,10 +235,6 @@ void MCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
|
||||
// Only absolute symbols can be redefined.
|
||||
assert((Symbol->isUndefined() || Symbol->isAbsolute()) &&
|
||||
"Cannot define a symbol twice!");
|
||||
|
||||
OS << *Symbol << " = " << *Value;
|
||||
EmitEOL();
|
||||
|
||||
|
Reference in New Issue
Block a user