Make EmitIntValue more efficient and more like what we do for leb128. The
difference is much smaller (about 0.3s) but significant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120787 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp
index 38ace6b..6df4ae4 100644
--- a/lib/MC/MCStreamer.cpp
+++ b/lib/MC/MCStreamer.cpp
@@ -46,7 +46,12 @@
 /// pass in a MCExpr for constant integers.
 void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size,
                               unsigned AddrSpace) {
-  EmitValue(MCConstantExpr::Create(Value, getContext()), Size, AddrSpace);
+  assert(Size <= 8);
+  char buf[8];
+  // FIXME: Endianness assumption.
+  for (unsigned i = 0; i != Size; ++i)
+    buf[i] = uint8_t(Value >> (i * 8));
+  EmitBytes(StringRef(buf, Size), AddrSpace);
 }
 
 /// EmitULEB128Value - Special case of EmitULEB128Value that avoids the