summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 57782eaaefc..d6b44a0297d 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -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'.
OpenPOWER on IntegriCloud