aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Interpreter/Interpreter.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-05-22 07:25:02 -0700
committerGitHub <noreply@github.com>2025-05-22 07:25:02 -0700
commitb048f3f8d7a6ff178dafa82e47f2dddd75c95258 (patch)
tree159785e3e589e2bc41f6b7971a84e115a4b02380 /clang/lib/Interpreter/Interpreter.cpp
parent8d06d4c1326ebd537f2219e0f0749945986cc8eb (diff)
downloadllvm-b048f3f8d7a6ff178dafa82e47f2dddd75c95258.zip
llvm-b048f3f8d7a6ff178dafa82e47f2dddd75c95258.tar.gz
llvm-b048f3f8d7a6ff178dafa82e47f2dddd75c95258.tar.bz2
[clang] Use llvm::is_contained (NFC) (#140985)
Diffstat (limited to 'clang/lib/Interpreter/Interpreter.cpp')
-rw-r--r--clang/lib/Interpreter/Interpreter.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp
index c04b2099..4b407a0 100644
--- a/clang/lib/Interpreter/Interpreter.cpp
+++ b/clang/lib/Interpreter/Interpreter.cpp
@@ -654,14 +654,13 @@ void Interpreter::ResetExecutor() { IncrExecutor.reset(); }
llvm::Error Interpreter::Execute(PartialTranslationUnit &T) {
assert(T.TheModule);
- LLVM_DEBUG(llvm::dbgs()
- << "execute-ptu "
- << ((std::find(PTUs.begin(), PTUs.end(), T) != PTUs.end())
- ? std::distance(PTUs.begin(),
- std::find(PTUs.begin(), PTUs.end(), T))
- : -1)
- << ": [TU=" << T.TUPart << ", M=" << T.TheModule.get() << " ("
- << T.TheModule->getName() << ")]\n");
+ LLVM_DEBUG(
+ llvm::dbgs() << "execute-ptu "
+ << (llvm::is_contained(PTUs, T)
+ ? std::distance(PTUs.begin(), llvm::find(PTUs, T))
+ : -1)
+ << ": [TU=" << T.TUPart << ", M=" << T.TheModule.get()
+ << " (" << T.TheModule->getName() << ")]\n");
if (!IncrExecutor) {
auto Err = CreateExecutor();
if (Err)