================ @@ -0,0 +1,207 @@ +//===- AnalysisDriver.cpp -------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "clang/ScalableStaticAnalysisFramework/Core/Analysis/AnalysisDriver.h" +#include "clang/ScalableStaticAnalysisFramework/Core/Analysis/AnalysisRegistry.h" +#include "clang/ScalableStaticAnalysisFramework/Core/Analysis/DerivedAnalysis.h" +#include "clang/ScalableStaticAnalysisFramework/Core/Analysis/SummaryAnalysis.h" +#include "clang/ScalableStaticAnalysisFramework/Core/Support/ErrorBuilder.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Support/Error.h" +#include "llvm/Support/ErrorHandling.h" +#include <map> +#include <vector> + +using namespace clang; +using namespace ssaf; + +AnalysisDriver::AnalysisDriver(std::unique_ptr<LUSummary> LU) + : LU(std::move(LU)) {} + +llvm::Expected<std::vector<std::unique_ptr<AnalysisBase>>> +AnalysisDriver::sort(llvm::ArrayRef<AnalysisName> Roots) { + struct Visitor { + enum class State { Unvisited, Visiting, Visited }; + + std::map<AnalysisName, State> Marks; + std::vector<AnalysisName> Path; + std::vector<std::unique_ptr<AnalysisBase>> Result; ---------------- aviralg wrote:
There is too much noise from type declarations in using `llvm::ReversePostOrderTraversal`, from what I can tell. It complicates matters. https://github.com/llvm/llvm-project/pull/186813 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
