[llvm-commits] [llvm] r121402 - /llvm/trunk/lib/MC/MCStreamer.cpp
Devang Patel
dpatel at apple.com
Thu Dec 9 11:26:21 PST 2010
Author: dpatel
Date: Thu Dec 9 13:26:21 2010
New Revision: 121402
URL: http://llvm.org/viewvc/llvm-project?rev=121402&view=rev
Log:
Add assert to catch an attempt to emit .byte 256
Modified:
llvm/trunk/lib/MC/MCStreamer.cpp
Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=121402&r1=121401&r2=121402&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Thu Dec 9 13:26:21 2010
@@ -47,7 +47,8 @@
/// 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)
More information about the llvm-commits
mailing list