diff --git a/clang-tools-extra/pseudo/lib/GLR.cpp b/clang-tools-extra/pseudo/lib/GLR.cpp index c1fdd8680ca8..771d69fb680d 100644 --- a/clang-tools-extra/pseudo/lib/GLR.cpp +++ b/clang-tools-extra/pseudo/lib/GLR.cpp @@ -90,12 +90,13 @@ const ForestNode &glrParse(const TokenStream &Tokens, }); if (!PendingAccept.empty()) { - LLVM_DEBUG(llvm::dbgs() << llvm::formatv("Accept: {0} accepted result:\n", - PendingAccept.size())); - for (const auto &Accept : PendingAccept) - LLVM_DEBUG(llvm::dbgs() - << " - " << G.symbolName(Accept.Head->Payload->symbol()) - << "\n"); + LLVM_DEBUG({ + llvm::dbgs() << llvm::formatv("Accept: {0} accepted result:\n", + PendingAccept.size()); + for (const auto &Accept : PendingAccept) + llvm::dbgs() << " - " << G.symbolName(Accept.Head->Payload->symbol()) + << "\n"; + }); assert(PendingAccept.size() == 1); return *PendingAccept.front().Head->Payload; }