diff options
author | Jordan Rose <jordan_rose@apple.com> | 2019-10-07 18:14:24 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2019-10-07 18:14:24 +0000 |
commit | fdaa74217420729140f1786ea037ac445a724c8e (patch) | |
tree | 1b91bbb4f3cb6f58d9a1268c974d708fc7b1089b /llvm/lib/Transforms/Utils/PredicateInfo.cpp | |
parent | f385a381404797f5c44298d34c4ba804fad556d3 (diff) | |
download | llvm-fdaa74217420729140f1786ea037ac445a724c8e.zip llvm-fdaa74217420729140f1786ea037ac445a724c8e.tar.gz llvm-fdaa74217420729140f1786ea037ac445a724c8e.tar.bz2 |
Second attempt to add iterator_range::empty()
Doing this makes MSVC complain that `empty(someRange)` could refer to
either C++17's std::empty or LLVM's llvm::empty, which previously we
avoided via SFINAE because std::empty is defined in terms of an empty
member rather than begin and end. So, switch callers over to the new
method as it is added.
https://reviews.llvm.org/D68439
llvm-svn: 373935
Diffstat (limited to 'llvm/lib/Transforms/Utils/PredicateInfo.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/PredicateInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp index 3c288ba..44859ea 100644 --- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp +++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp @@ -556,7 +556,7 @@ Value *PredicateInfo::materializeStack(unsigned int &Counter, if (isa<PredicateWithEdge>(ValInfo)) { IRBuilder<> B(getBranchTerminator(ValInfo)); Function *IF = getCopyDeclaration(F.getParent(), Op->getType()); - if (empty(IF->users())) + if (IF->users().empty()) CreatedDeclarations.insert(IF); CallInst *PIC = B.CreateCall(IF, Op, Op->getName() + "." + Twine(Counter++)); @@ -568,7 +568,7 @@ Value *PredicateInfo::materializeStack(unsigned int &Counter, "Should not have gotten here without it being an assume"); IRBuilder<> B(PAssume->AssumeInst); Function *IF = getCopyDeclaration(F.getParent(), Op->getType()); - if (empty(IF->users())) + if (IF->users().empty()) CreatedDeclarations.insert(IF); CallInst *PIC = B.CreateCall(IF, Op); PredicateMap.insert({PIC, ValInfo}); |