Fix Size Typing
authorDavid Greene <greened@obbligato.org>
Wed, 31 Aug 2011 21:34:20 +0000 (21:34 +0000)
committerDavid Greene <greened@obbligato.org>
Wed, 31 Aug 2011 21:34:20 +0000 (21:34 +0000)
Stores sizes as uint64_t to avoid possible truncation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138901 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index e888985820e163b8901af6c1c782af6ce4672b96..f7341fee4bed4058d532498364c4359fca10afb8 100644 (file)
@@ -1575,7 +1575,7 @@ static void EmitGlobalConstantArray(const ConstantArray *CA, unsigned AddrSpace,
     int Value = isRepeatedByteSequence(CA, AP.TM);
 
     if (Value != -1) {
-      unsigned Bytes = AP.TM.getTargetData()->getTypeAllocSize(CA->getType());
+      uint64_t Bytes = AP.TM.getTargetData()->getTypeAllocSize(CA->getType());
       AP.OutStreamer.EmitFill(Bytes, Value, AddrSpace);
     }
     else {