diff options
author | Tom Stellard <tstellar@redhat.com> | 2017-05-23 17:30:58 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2017-05-23 17:30:58 +0000 |
commit | 1ddbad1bae72d51d742d0eb8887b9fbf3c530738 (patch) | |
tree | 81ab75d15bbcd067aea522543aeca0a2f28b99c7 | |
parent | eba25615ba1d051856851bfa7c0fad22c6d5904e (diff) | |
download | llvm-1ddbad1bae72d51d742d0eb8887b9fbf3c530738.tar.gz |
Merging r302137:
------------------------------------------------------------------------
r302137 | mstorsjo | 2017-05-04 06:54:35 -0400 (Thu, 04 May 2017) | 9 lines
[ArgPromotion] Fix a truncated variable
This fixes a regression since SVN rev 273808 (which was supposed to
not change functionality).
The regression caused miscompilations (noted in the wild when targeting
AArch64) on platforms with 32 bit long.
Differential Revision: https://reviews.llvm.org/D32850
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@303661 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 65b7bad3b1ed..fdb76f881602 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -826,7 +826,7 @@ DoPromotion(Function *F, SmallPtrSetImpl<Argument *> &ArgsToPromote, if (!ArgIndex.second.empty()) { Ops.reserve(ArgIndex.second.size()); Type *ElTy = V->getType(); - for (unsigned long II : ArgIndex.second) { + for (auto II : ArgIndex.second) { // Use i32 to index structs, and i64 for others (pointers/arrays). // This satisfies GEP constraints. Type *IdxTy = (ElTy->isStructTy() ? |