diff options
author | Devang Patel <dpatel@apple.com> | 2010-12-09 19:26:21 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-12-09 19:26:21 +0000 |
commit | dea914bed9fb1d5c08e944557989ccddb6849000 (patch) | |
tree | 064bc5773f2ba460f6955868be19e61542379713 /lib/MC/MCStreamer.cpp | |
parent | 193c3acbe5cdb60767d114016970e898c7502d7a (diff) | |
download | external_llvm-dea914bed9fb1d5c08e944557989ccddb6849000.zip external_llvm-dea914bed9fb1d5c08e944557989ccddb6849000.tar.gz external_llvm-dea914bed9fb1d5c08e944557989ccddb6849000.tar.bz2 |
Add assert to catch an attempt to emit .byte 256
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r-- | lib/MC/MCStreamer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 096cea7..e003a95 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -47,7 +47,8 @@ void MCStreamer::EmitDwarfSetLineAddr(int64_t LineDelta, /// pass in a MCExpr for constant integers. void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size, unsigned AddrSpace) { - assert(Size <= 8); + assert(Size <= 8 && "Invalid size"); + assert(!(Size == 1 && (signed)Value > 255) && "Invalid size"); char buf[8]; // FIXME: Endianness assumption. for (unsigned i = 0; i != Size; ++i) |