summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WinCOFFObjectWriter.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-10-09 11:00:37 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-10-09 11:00:37 +0000
commitbe52c62a6da6485ac2f4d3fe133144269c8e39d0 (patch)
tree59ac9c54ecef7615e1d42d220431c26e968ec001 /llvm/lib/MC/WinCOFFObjectWriter.cpp
parent65b2a965fbecbd9484547abb2fc293dbdb3e7b2e (diff)
downloadbcm5719-llvm-be52c62a6da6485ac2f4d3fe133144269c8e39d0.tar.gz
bcm5719-llvm-be52c62a6da6485ac2f4d3fe133144269c8e39d0.zip
MC-COFF: Assert on non-coff sections.
llvm-svn: 116148
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index 7bb19b2481c..c6ea31a34e3 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -359,6 +359,8 @@ object_t *WinCOFFObjectWriter::createCOFFEntity(llvm::StringRef Name,
/// This function takes a section data object from the assembler
/// and creates the associated COFF section staging object.
void WinCOFFObjectWriter::DefineSection(MCSectionData const &SectionData) {
+ assert(SectionData.getSection().getVariant() == MCSection::SV_COFF
+ && "Got non COFF section in the COFF backend!");
// FIXME: Not sure how to verify this (at least in a debug build).
MCSectionCOFF const &Sec =
static_cast<MCSectionCOFF const &>(SectionData.getSection());
OpenPOWER on IntegriCloud