From 589ddd7fe8e4dcf3323dd0b8f6af3ae953ed6037 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Sat, 23 Jul 2022 01:13:24 +0200 Subject: [PATCH] [clang][dataflow] ArrayRef'ize debugString() Reviewed By: ymandel Differential Revision: https://reviews.llvm.org/D130400 --- clang/include/clang/Analysis/FlowSensitive/DebugSupport.h | 2 +- clang/lib/Analysis/FlowSensitive/DebugSupport.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Analysis/FlowSensitive/DebugSupport.h b/clang/include/clang/Analysis/FlowSensitive/DebugSupport.h index ef903d8..3b85485 100644 --- a/clang/include/clang/Analysis/FlowSensitive/DebugSupport.h +++ b/clang/include/clang/Analysis/FlowSensitive/DebugSupport.h @@ -46,7 +46,7 @@ std::string debugString( /// /// Names assigned to atoms should not be repeated in `AtomNames`. std::string debugString( - const std::vector &Constraints, const Solver::Result &Result, + ArrayRef Constraints, const Solver::Result &Result, llvm::DenseMap AtomNames = {{}}); inline std::string debugString( const llvm::DenseSet &Constraints, diff --git a/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp b/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp index a2895d0..1d699a9 100644 --- a/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp +++ b/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp @@ -82,7 +82,7 @@ public: /// Returns a string representation of a set of boolean `Constraints` and the /// `Result` of satisfiability checking on the `Constraints`. - std::string debugString(const std::vector &Constraints, + std::string debugString(ArrayRef &Constraints, const Solver::Result &Result) { auto Template = R"( Constraints @@ -185,8 +185,7 @@ debugString(const BoolValue &B, } std::string -debugString(const std::vector &Constraints, - const Solver::Result &Result, +debugString(ArrayRef Constraints, const Solver::Result &Result, llvm::DenseMap AtomNames) { return DebugStringGenerator(std::move(AtomNames)) .debugString(Constraints, Result); -- 2.7.4