summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index a2de5d99a05..2eb37db7e68 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -527,7 +527,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
Out << (unsigned char)(nibble + '0');
else
Out << (unsigned char)(nibble - 10 + 'A');
- if (shiftcount == 0) {
+ if (shiftcount == 0 && j+4 < width) {
word = *(++p);
shiftcount = 64;
if (width-j-4 < 64)
OpenPOWER on IntegriCloud