Disallow assigning symbol a null section.
[oota-llvm.git] / lib / MC / MCStreamer.cpp
index 57782eaaefcc882c1a8e06c1d17f40363303f3fd..d6b44a0297d5e2129c68653277cb18043e81eeef 100644 (file)
@@ -189,10 +189,8 @@ void MCStreamer::InitSections(bool NoExecStack) {
 }
 
 void MCStreamer::AssignSection(MCSymbol *Symbol, MCSection *Section) {
-  if (Section)
-    Symbol->setSection(*Section);
-  else
-    Symbol->setUndefined();
+  assert(Section);
+  Symbol->setSection(*Section);
 
   // As we emit symbols into a section, track the order so that they can
   // be sorted upon later. Zero is reserved to mean 'unemitted'.