diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-14 11:02:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-14 11:02:49 +0000 |
commit | abf40ba6e8da184d6df40289b0825ee756eb567b (patch) | |
tree | 8fd2d4812b31be171834f894bd27cd38ccba3b1e /llvm/lib/Transforms/TransformInternals.cpp | |
parent | 33c400f6a74c48838bf29a343bfaa7e0a9dd7595 (diff) | |
download | bcm5719-llvm-abf40ba6e8da184d6df40289b0825ee756eb567b.tar.gz bcm5719-llvm-abf40ba6e8da184d6df40289b0825ee756eb567b.zip |
Better heuristics for handling arrays
llvm-svn: 1296
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.cpp')
-rw-r--r-- | llvm/lib/Transforms/TransformInternals.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/TransformInternals.cpp b/llvm/lib/Transforms/TransformInternals.cpp index ac8181b7224..6929a5fb3c0 100644 --- a/llvm/lib/Transforms/TransformInternals.cpp +++ b/llvm/lib/Transforms/TransformInternals.cpp @@ -102,7 +102,7 @@ void ReplaceInstWithInst(BasicBlock::InstListType &BIL, const Type *getStructOffsetType(const Type *Ty, unsigned &Offset, vector<ConstPoolVal*> &Offsets, bool StopEarly = true) { - if (!isa<StructType>(Ty) || (Offset == 0 && StopEarly)) { + if (!isa<StructType>(Ty) || (Offset == 0 && StopEarly && !Offsets.empty())) { Offset = 0; // Return the offset that we were able to acheive return Ty; // Return the leaf type } |