[llvm-commits] [123403] Fix test/CFrontend/2007-02-04-EmptyStruct.c, patch by Anton!
clattner at apple.com
clattner at apple.com
Sun Feb 4 15:54:40 PST 2007
Revision: 123403
Author: clattner
Date: 2007-02-04 15:54:39 -0800 (Sun, 04 Feb 2007)
Log Message:
-----------
Fix test/CFrontend/2007-02-04-EmptyStruct.c, patch by Anton!
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-convert.cpp
Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-02-04 10:30:17 UTC (rev 123402)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-02-04 23:54:39 UTC (rev 123403)
@@ -2480,7 +2480,7 @@
// If EltSize exactly divides Offset, then we know that we can turn this
// into a getelementptr instruction.
- int64_t EltOffset = Offset/EltSize;
+ int64_t EltOffset = EltSize ? Offset/EltSize : 0;
if (EltOffset*EltSize == Offset) {
// If this is a subtract, we want to step backwards.
if (Opc == Instruction::Sub)
More information about the llvm-commits
mailing list