aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-05 19:01:00 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-05 19:01:00 +0000
commitc304718fd8fa25f3f36f47f3de0e0cfe7578bc9e (patch)
treeca18393d0b2db358867f51a1d2196e783d779e86 /lib/MC/MCAsmStreamer.cpp
parent8d627d31531ad45fecca82d52cd34092c7c4cc1d (diff)
downloadexternal_llvm-c304718fd8fa25f3f36f47f3de0e0cfe7578bc9e.zip
external_llvm-c304718fd8fa25f3f36f47f3de0e0cfe7578bc9e.tar.gz
external_llvm-c304718fd8fa25f3f36f47f3de0e0cfe7578bc9e.tar.bz2
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
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r--lib/MC/MCAsmStreamer.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index dc09f21..1d231bb 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/lib/MC/MCAsmStreamer.cpp
@@ -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();