diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-12-02 02:24:42 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-12-02 02:24:42 +0000 |
commit | ab85225be49b2abf5112823d84525e91d469d6bd (patch) | |
tree | 409fc728e31d6bd0afc63bdb4ba06b7c96f6a816 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | 6afcab35887245f36751790ba33debaf74b0d2ee (diff) | |
download | bcm5719-llvm-ab85225be49b2abf5112823d84525e91d469d6bd.tar.gz bcm5719-llvm-ab85225be49b2abf5112823d84525e91d469d6bd.zip |
IR: Change the gep_type_iterator API to avoid always exposing the "current" type.
Instead, expose whether the current type is an array or a struct, if an array
what the upper bound is, and if a struct the struct type itself. This is
in preparation for a later change which will make PointerType derive from
Type rather than SequentialType.
Differential Revision: https://reviews.llvm.org/D26594
llvm-svn: 288458
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 323b81ca815..2f4e3e99b3f 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1416,7 +1416,7 @@ static bool canReplaceOperandWithVariable(const Instruction *I, if (OpIdx == 0) return true; gep_type_iterator It = std::next(gep_type_begin(I), OpIdx - 1); - return !It->isStructTy(); + return It.isSequential(); } } |