Author: Dmitri Gribenko Date: 2022-07-23T01:16:31+02:00 New Revision: 589ddd7fe8e4dcf3323dd0b8f6af3ae953ed6037
URL: https://github.com/llvm/llvm-project/commit/589ddd7fe8e4dcf3323dd0b8f6af3ae953ed6037 DIFF: https://github.com/llvm/llvm-project/commit/589ddd7fe8e4dcf3323dd0b8f6af3ae953ed6037.diff LOG: [clang][dataflow] ArrayRef'ize debugString() Reviewed By: ymandel Differential Revision: https://reviews.llvm.org/D130400 Added: Modified: clang/include/clang/Analysis/FlowSensitive/DebugSupport.h clang/lib/Analysis/FlowSensitive/DebugSupport.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Analysis/FlowSensitive/DebugSupport.h b/clang/include/clang/Analysis/FlowSensitive/DebugSupport.h index ef903d807e12f..3b854850907b5 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<BoolValue *> &Constraints, const Solver::Result &Result, + ArrayRef<BoolValue *> Constraints, const Solver::Result &Result, llvm::DenseMap<const AtomicBoolValue *, std::string> AtomNames = {{}}); inline std::string debugString( const llvm::DenseSet<BoolValue *> &Constraints, diff --git a/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp b/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp index a2895d0197b1d..1d699a9c98040 100644 --- a/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp +++ b/clang/lib/Analysis/FlowSensitive/DebugSupport.cpp @@ -82,7 +82,7 @@ class DebugStringGenerator { /// 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<BoolValue *> &Constraints, + std::string debugString(ArrayRef<BoolValue *> &Constraints, const Solver::Result &Result) { auto Template = R"( Constraints @@ -185,8 +185,7 @@ debugString(const BoolValue &B, } std::string -debugString(const std::vector<BoolValue *> &Constraints, - const Solver::Result &Result, +debugString(ArrayRef<BoolValue *> Constraints, const Solver::Result &Result, llvm::DenseMap<const AtomicBoolValue *, std::string> AtomNames) { return DebugStringGenerator(std::move(AtomNames)) .debugString(Constraints, Result); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits