summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index cb3642532c1..89bc5bc637a 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -97,6 +97,7 @@ static inline MCValue truncateToSize(const MCValue &Value, unsigned Bytes) {
}
void MCAsmStreamer::SwitchSection(const MCSection *Section) {
+ assert(Section && "Cannot switch to a null section!");
if (Section != CurSection) {
CurSection = Section;
Section->PrintSwitchToSection(TAI, OS);
OpenPOWER on IntegriCloud