diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-09 03:16:50 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-09 03:16:50 +0000 |
commit | 4d01fff4923795055c19272d08247d66cc2ed1fd (patch) | |
tree | a35c029350f0ddb710086981cf1aa1c451baabc1 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | cdf4788401afff02e12279fc1fded94d6180639c (diff) | |
download | bcm5719-llvm-4d01fff4923795055c19272d08247d66cc2ed1fd.tar.gz bcm5719-llvm-4d01fff4923795055c19272d08247d66cc2ed1fd.zip |
[C++11] Update Clang for the change to LLVM's Use-Def chain iterators in
r203364: what was use_iterator is now user_iterator, and there is
a use_iterator for directly iterating over the uses.
This also switches to use the range-based APIs where appropriate.
llvm-svn: 203365
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a5cd9e34af5..c8dd8136fd2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1938,7 +1938,7 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old, for (llvm::Value::use_iterator ui = old->use_begin(), ue = old->use_end(); ui != ue; ) { llvm::Value::use_iterator use = ui++; // Increment before the use is erased. - llvm::User *user = *use; + llvm::User *user = use->getUser(); // Recognize and replace uses of bitcasts. Most calls to // unprototyped functions will use bitcasts. @@ -1951,7 +1951,7 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old, // Recognize calls to the function. llvm::CallSite callSite(user); if (!callSite) continue; - if (!callSite.isCallee(use)) continue; + if (!callSite.isCallee(&*use)) continue; // If the return types don't match exactly, then we can't // transform this call unless it's dead. |