diff --git a/.clang-tidy b/.clang-tidy index ad126f0017..57a4a45300 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -15,6 +15,7 @@ Checks: '-*, -readability-function-cognitive-complexity, -readability-convert-member-functions-to-static, -readability-isolate-declaration, + -readability-identifier-length, cppcoreguidelines-*, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, diff --git a/include/phasar/DB/ProjectIRDB.h b/include/phasar/DB/ProjectIRDB.h index c82af92a51..67958d216f 100644 --- a/include/phasar/DB/ProjectIRDB.h +++ b/include/phasar/DB/ProjectIRDB.h @@ -229,6 +229,11 @@ class ProjectIRDB { persistedStringToValue(const std::string &StringRep) const; }; +/** + * Revserses the getMetaDataID function + */ +const llvm::Value *fromMetaDataId(const ProjectIRDB &IRDB, llvm::StringRef Id); + } // namespace psr #endif diff --git a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h index a6e56b4733..a26c694aa0 100644 --- a/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h +++ b/include/phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h @@ -25,7 +25,7 @@ #include "llvm/IR/Function.h" #include "phasar/PhasarLLVM/ControlFlow/CFG.h" -#include "phasar/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" #include "nlohmann/json.hpp" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h index 027ac0ba56..6f66e631d6 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/InitialSeeds.h @@ -15,7 +15,7 @@ #include #include "phasar/PhasarLLVM/Utils/BinaryDomain.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h index a730c33d0d..444fb42fb0 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h @@ -21,7 +21,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace llvm { class Value; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h index 315c063362..5ab15978cb 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h @@ -28,7 +28,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h index fc973b9953..157d2cca6d 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.h @@ -41,8 +41,8 @@ #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "phasar/PhasarLLVM/Utils/BasicBlockOrdering.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/PhasarLLVM/Utils/LatticeDomain.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h index 46db74a579..f466c93f9c 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h @@ -21,7 +21,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace llvm { class CallBase; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h index af0ee0f381..805315a1d6 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h @@ -46,10 +46,10 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToUtils.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/PhasarLLVM/Utils/LatticeDomain.h" #include "phasar/Utils/BitVectorSet.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" // have some handy helper functionalities diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h index 615fefa2d2..44271e1e21 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSFieldSensTaintAnalysis.h @@ -21,7 +21,7 @@ #include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" #include "phasar/PhasarLLVM/Domain/ExtendedValue.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace llvm { class Value; diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h index f473dffcf3..ed670cfc7d 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h @@ -49,7 +49,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/PathEdge.h" #include "phasar/PhasarLLVM/Domain/AnalysisDomain.h" #include "phasar/PhasarLLVM/Utils/DOTGraph.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/PAMMMacros.h" #include "phasar/Utils/Table.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h index 75e53be814..0bf0b2ec7c 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h @@ -27,7 +27,7 @@ #include "llvm/ADT/SmallVector.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctions.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Table.h" diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h b/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h index 18e4886fd9..134eb16ff0 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h @@ -6,7 +6,7 @@ #include #include "boost/functional/hash.hpp" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h b/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h index a3c5c7b7bd..441373c420 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/Mono/Solver/InterMonoSolver.h @@ -25,7 +25,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/Mono/Contexts/CallStringCTX.h" #include "phasar/PhasarLLVM/DataFlowSolver/Mono/InterMonoProblem.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/include/phasar/PhasarLLVM/DataFlowSolver/WPDS/Solver/WPDSSolver.h b/include/phasar/PhasarLLVM/DataFlowSolver/WPDS/Solver/WPDSSolver.h index ec3a4ec9d6..9c70d779a9 100644 --- a/include/phasar/PhasarLLVM/DataFlowSolver/WPDS/Solver/WPDSSolver.h +++ b/include/phasar/PhasarLLVM/DataFlowSolver/WPDS/Solver/WPDSSolver.h @@ -37,7 +37,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/PathEdge.h" #include "phasar/PhasarLLVM/DataFlowSolver/WPDS/JoinLatticeToSemiRingElem.h" #include "phasar/PhasarLLVM/DataFlowSolver/WPDS/WPDSProblem.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Table.h" diff --git a/include/phasar/PhasarLLVM/TaintConfig/TaintConfigUtilities.h b/include/phasar/PhasarLLVM/TaintConfig/TaintConfigUtilities.h index c2ea198c9e..6c92987bec 100644 --- a/include/phasar/PhasarLLVM/TaintConfig/TaintConfigUtilities.h +++ b/include/phasar/PhasarLLVM/TaintConfig/TaintConfigUtilities.h @@ -18,7 +18,7 @@ #include "llvm/IR/Instructions.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { template // high_resolution_clock::time_point, milliseconds #include // set #include // string @@ -25,7 +27,7 @@ namespace llvm { class raw_ostream; -} +} // namespace llvm namespace psr { @@ -188,7 +190,8 @@ class PAMM { /// \brief Exports the measured data to JSON - associated macro: /// EXPORT_MEASURED_DATA(PATH). /// \param OutputPath to exported JSON file. - void exportMeasuredData(std::string OutputPath); + void exportMeasuredData(std::string OutputPath, + boost::program_options::variables_map &Config); }; } // namespace psr diff --git a/include/phasar/Utils/Utilities.h b/include/phasar/Utils/Utilities.h index 3d07e8e6ea..13601efa2d 100644 --- a/include/phasar/Utils/Utilities.h +++ b/include/phasar/Utils/Utilities.h @@ -162,9 +162,8 @@ struct StringIDLess { template class scope_exit { // NOLINT public: template ()())> - explicit scope_exit(FFn &&F) noexcept( - std::is_nothrow_constructible_v || - std::is_nothrow_constructible_v) + scope_exit(FFn &&F) noexcept(std::is_nothrow_constructible_v || + std::is_nothrow_constructible_v) : F(std::forward(F)) {} ~scope_exit() { F(); } diff --git a/lib/Config/CMakeLists.txt b/lib/Config/CMakeLists.txt index faf5945e62..d7c6bf63dc 100644 --- a/lib/Config/CMakeLists.txt +++ b/lib/Config/CMakeLists.txt @@ -1,5 +1,9 @@ file(GLOB_RECURSE CONFIG_SRC *.h *.cpp) +set(PHASAR_LINK_LIBS + phasar_utils +) + set(LLVM_LINK_COMPONENTS Support ) diff --git a/lib/DB/CMakeLists.txt b/lib/DB/CMakeLists.txt index 30bae08d58..0b966a028c 100644 --- a/lib/DB/CMakeLists.txt +++ b/lib/DB/CMakeLists.txt @@ -7,6 +7,7 @@ include_directories( set(PHASAR_LINK_LIBS phasar_passes phasar_utils + phasar_phasarllvm_utils ) set(LLVM_LINK_COMPONENTS diff --git a/lib/DB/DBConn.cpp b/lib/DB/DBConn.cpp index e1bf2cb8d0..0eb3958285 100644 --- a/lib/DB/DBConn.cpp +++ b/lib/DB/DBConn.cpp @@ -34,8 +34,8 @@ #include "phasar/DB/Hexastore.h" #include "phasar/PhasarLLVM/Pointer/VTable.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/IO.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Macros.h" diff --git a/lib/DB/ProjectIRDB.cpp b/lib/DB/ProjectIRDB.cpp index 6fc41b35e0..c4968c793b 100644 --- a/lib/DB/ProjectIRDB.cpp +++ b/lib/DB/ProjectIRDB.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -31,9 +32,9 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/Passes/GeneralStatisticsAnalysis.h" #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/EnumFlags.h" #include "phasar/Utils/IO.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/PAMMMacros.h" #include "phasar/Utils/Utilities.h" @@ -551,3 +552,44 @@ bool ProjectIRDB::debugInfoAvailable() const { } } // namespace psr + +const llvm::Value *psr::fromMetaDataId(const ProjectIRDB &IRDB, + llvm::StringRef Id) { + if (Id.empty() || Id[0] == '-') { + return nullptr; + } + + auto ParseInt = [](llvm::StringRef Str) -> std::optional { + unsigned Num; + auto [Ptr, EC] = std::from_chars(Str.data(), Str.data() + Str.size(), Num); + + if (EC == std::errc{}) { + return Num; + } + + PHASAR_LOG_LEVEL(WARNING, "Invalid metadata id '" + << Str.str() << "': " + << std::make_error_code(EC).message()); + return std::nullopt; + }; + + if (auto Dot = Id.find('.'); Dot != llvm::StringRef::npos) { + auto FName = Id.slice(0, Dot); + + auto ArgNr = ParseInt(Id.drop_front(Dot + 1)); + + if (!ArgNr) { + return nullptr; + } + + const auto *F = IRDB.getFunction(FName); + if (F) { + return getNthFunctionArgument(F, *ArgNr); + } + + return nullptr; + } + + auto IdNr = ParseInt(Id); + return IdNr ? IRDB.getInstruction(*IdNr) : nullptr; +} diff --git a/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.cpp b/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.cpp index 11570f91c6..bdb87c6c51 100644 --- a/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.cpp +++ b/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.cpp @@ -22,7 +22,7 @@ #include "phasar/Config/Configuration.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace psr; using namespace std; diff --git a/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.cpp b/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.cpp index ea8a846823..44bd7be37e 100644 --- a/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.cpp +++ b/lib/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.cpp @@ -25,7 +25,7 @@ #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/PAMM.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/ControlFlow/LLVMBasedCFG.cpp b/lib/PhasarLLVM/ControlFlow/LLVMBasedCFG.cpp index 713d454e6d..5739df0f34 100644 --- a/lib/PhasarLLVM/ControlFlow/LLVMBasedCFG.cpp +++ b/lib/PhasarLLVM/ControlFlow/LLVMBasedCFG.cpp @@ -32,7 +32,7 @@ #include "nlohmann/json.hpp" #include "phasar/Config/Configuration.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/ControlFlow/LLVMBasedICFG.cpp b/lib/PhasarLLVM/ControlFlow/LLVMBasedICFG.cpp index b42e6b309e..096e0521bc 100644 --- a/lib/PhasarLLVM/ControlFlow/LLVMBasedICFG.cpp +++ b/lib/PhasarLLVM/ControlFlow/LLVMBasedICFG.cpp @@ -52,9 +52,9 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/PhasarPass/Options.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/NlohmannLogging.h" #include "phasar/Utils/PAMMMacros.h" diff --git a/lib/PhasarLLVM/ControlFlow/Resolver/CHAResolver.cpp b/lib/PhasarLLVM/ControlFlow/Resolver/CHAResolver.cpp index 777066a012..9318cc121b 100644 --- a/lib/PhasarLLVM/ControlFlow/Resolver/CHAResolver.cpp +++ b/lib/PhasarLLVM/ControlFlow/Resolver/CHAResolver.cpp @@ -22,7 +22,7 @@ #include "phasar/PhasarLLVM/ControlFlow/Resolver/CHAResolver.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/ControlFlow/Resolver/DTAResolver.cpp b/lib/PhasarLLVM/ControlFlow/Resolver/DTAResolver.cpp index 547e7fad07..0c372ffab0 100644 --- a/lib/PhasarLLVM/ControlFlow/Resolver/DTAResolver.cpp +++ b/lib/PhasarLLVM/ControlFlow/Resolver/DTAResolver.cpp @@ -25,7 +25,7 @@ #include "phasar/PhasarLLVM/ControlFlow/Resolver/DTAResolver.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/ControlFlow/Resolver/OTFResolver.cpp b/lib/PhasarLLVM/ControlFlow/Resolver/OTFResolver.cpp index 6a68455b27..b4b0b09170 100644 --- a/lib/PhasarLLVM/ControlFlow/Resolver/OTFResolver.cpp +++ b/lib/PhasarLLVM/ControlFlow/Resolver/OTFResolver.cpp @@ -36,7 +36,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToGraph.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/ControlFlow/Resolver/RTAResolver.cpp b/lib/PhasarLLVM/ControlFlow/Resolver/RTAResolver.cpp index c3ca893c22..4413439151 100644 --- a/lib/PhasarLLVM/ControlFlow/Resolver/RTAResolver.cpp +++ b/lib/PhasarLLVM/ControlFlow/Resolver/RTAResolver.cpp @@ -23,7 +23,7 @@ #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/ControlFlow/Resolver/RTAResolver.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/ControlFlow/Resolver/Resolver.cpp b/lib/PhasarLLVM/ControlFlow/Resolver/Resolver.cpp index 334f8bada8..3cfbeaecae 100644 --- a/lib/PhasarLLVM/ControlFlow/Resolver/Resolver.cpp +++ b/lib/PhasarLLVM/ControlFlow/Resolver/Resolver.cpp @@ -26,7 +26,7 @@ #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/ControlFlow/Resolver/Resolver.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.cpp index 806a0fe227..b0dcdc3fba 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.cpp @@ -10,7 +10,7 @@ #include #include -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.cpp index 4bad67164a..742a6b8593 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.cpp @@ -9,7 +9,7 @@ #include -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.cpp index d180fc59cf..cbf1b33377 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.cpp @@ -20,7 +20,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/Log.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.cpp index 46b1a73553..0ff0703625 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.cpp @@ -14,8 +14,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/AbstractMemoryLocation.h" #include "phasar/PhasarLLVM/Utils/BasicBlockOrdering.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/DebugOutput.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" namespace psr::detail { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.cpp index 6b092f94c1..d0ea241e26 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.cpp @@ -8,7 +8,7 @@ *****************************************************************************/ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/DebugEdgeIdentity.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr::XTaint { DebugEdgeIdentity::DebugEdgeIdentity(const llvm::Instruction *Inst) diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.cpp index 7d0f2a3f9b..ecf2948440 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.cpp @@ -7,11 +7,12 @@ * Fabian Schiebel and others *****************************************************************************/ -#include "llvm/Support/raw_os_ostream.h" - #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/EdgeDomain.h" #include "phasar/PhasarLLVM/Utils/BasicBlockOrdering.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" + +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/Support/raw_os_ostream.h" namespace psr::XTaint { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.cpp index 6a8f2e8d81..1cf766398a 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/GenEdgeFunction.cpp @@ -15,7 +15,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/KillIfSanitizedEdgeFunction.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr::XTaint { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.cpp index 110fb2fd30..cf72107371 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.cpp @@ -14,7 +14,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/Helpers.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinConstEdgeFunction.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr::XTaint { JoinConstEdgeFunction::JoinConstEdgeFunction( diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.cpp index 08fcf7acfb..26ff8fc7fa 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.cpp @@ -12,7 +12,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/JoinEdgeFunction.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/ExtendedTaintAnalysis/TransferEdgeFunction.h" #include "phasar/PhasarLLVM/Utils/BasicBlockOrdering.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr::XTaint { TransferEdgeFunction::TransferEdgeFunction(BasicBlockOrdering &BBO, diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp index c6f7f576e3..bc5adf1a89 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEExtendedTaintAnalysis.cpp @@ -28,8 +28,8 @@ #include "phasar/PhasarLLVM/Pointer/PointsToInfo.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/DebugOutput.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.cpp index eafc1dc5f0..97a5ef6740 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/IDEGeneralizedLCA.cpp @@ -30,7 +30,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCallerFlowFunction.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/TypecastEdgeFunction.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IFDSToIDETabulationProblem.h" -#include "phasar/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" #include "phasar/Utils/Logger.h" namespace psr { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.cpp index b07a83160c..0b2982b15a 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.cpp @@ -16,7 +16,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/ConstantHelper.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEGeneralizedLCA/MapFactsToCalleeFlowFunction.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.cpp index 403d992a90..ac7842921d 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.cpp @@ -32,9 +32,9 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/PhasarPass/Options.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.cpp index bc50cadb0e..e28680d8d4 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.cpp @@ -16,7 +16,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEProtoAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.cpp index d6c703b6a7..9ab9e2d932 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.cpp @@ -17,8 +17,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowFunctions.h" #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESecureHeapPropagation.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { IDESecureHeapPropagation::IDESecureHeapPropagation( diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.cpp index e2d1ef6e3c..184306518f 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.cpp @@ -24,7 +24,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDESolverTest.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETaintAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETaintAnalysis.cpp index 54ea711bcc..49ada070e7 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETaintAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETaintAnalysis.cpp @@ -23,7 +23,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETaintAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.cpp index f7d7568586..492e18ef51 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.cpp @@ -29,8 +29,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDETypeStateAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.cpp index ba400d7b93..e7cbefa7fc 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysis.cpp @@ -25,9 +25,9 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMCXXShorthands.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMCXXShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/PAMMMacros.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSLinearConstantAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSLinearConstantAnalysis.cpp index 2b7019ed1f..16f8c8ef04 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSLinearConstantAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSLinearConstantAnalysis.cpp @@ -20,7 +20,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.cpp index fbaa55bfc0..e8cad1745e 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.cpp @@ -20,7 +20,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSProtoAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace psr; using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.cpp index 4566ed0c1d..8e11066a91 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.cpp @@ -19,7 +19,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSignAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" namespace psr { diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.cpp index e63fe51a82..28a29bbc84 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSSolverTest.cpp @@ -20,7 +20,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.cpp index 7af4b6ef7a..d5d8978cff 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTaintAnalysis.cpp @@ -24,8 +24,8 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfigUtilities.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.cpp index acfcff6e71..d92b4a6251 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSTypeAnalysis.cpp @@ -16,7 +16,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.cpp b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.cpp index edce3bed18..e6177468ee 100644 --- a/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSUninitializedVariables.cpp @@ -25,8 +25,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/IfdsIde/SpecialSummaries.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.cpp b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.cpp index 2b9e4f90e7..393d2ce563 100644 --- a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.cpp @@ -23,8 +23,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoFullConstantPropagation.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/BitVectorSet.h" -#include "phasar/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.cpp b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.cpp index f299ba2ab5..9eefeb8469 100644 --- a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.cpp @@ -18,7 +18,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoSolverTest.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Utilities.h" namespace psr { diff --git a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.cpp b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.cpp index 421652b4ef..30ea22043f 100644 --- a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/InterMonoTaintAnalysis.cpp @@ -22,8 +22,8 @@ #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfigUtilities.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/BitVectorSet.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" diff --git a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.cpp b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.cpp index f95ac4299b..b000e138ab 100644 --- a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.cpp @@ -21,8 +21,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoFullConstantPropagation.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/BitVectorSet.h" -#include "phasar/Utils/LLVMShorthands.h" namespace std { template <> struct hash> { diff --git a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.cpp b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.cpp index ba2e03db05..b84e354605 100644 --- a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.cpp @@ -25,7 +25,7 @@ #include "phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoSolverTest.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.cpp b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.cpp index bbda9aa17c..9746ce8351 100644 --- a/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.cpp @@ -21,8 +21,8 @@ #include "phasar/PhasarLLVM/DataFlowSolver/Mono/Problems/IntraMonoUninitVariables.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/BitVectorSet.h" -#include "phasar/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSAliasCollector.cpp b/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSAliasCollector.cpp index 8806bac7b9..619097e221 100644 --- a/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSAliasCollector.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSAliasCollector.cpp @@ -18,7 +18,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "phasar/PhasarLLVM/Utils/BinaryDomain.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSSolverTest.cpp b/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSSolverTest.cpp index 5b2d5f0257..93b0e8d9f5 100644 --- a/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSSolverTest.cpp +++ b/lib/PhasarLLVM/DataFlowSolver/WPDS/Problems/WPDSSolverTest.cpp @@ -17,7 +17,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "phasar/PhasarLLVM/Utils/BinaryDomain.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/lib/PhasarLLVM/Passes/GeneralStatisticsAnalysis.cpp b/lib/PhasarLLVM/Passes/GeneralStatisticsAnalysis.cpp index 44bfb2cae6..f195755c86 100644 --- a/lib/PhasarLLVM/Passes/GeneralStatisticsAnalysis.cpp +++ b/lib/PhasarLLVM/Passes/GeneralStatisticsAnalysis.cpp @@ -14,7 +14,9 @@ * Author: pdschbrt */ -#include +#include "phasar/PhasarLLVM/Passes/GeneralStatisticsAnalysis.h" +#include "phasar/Utils/Logger.h" +#include "phasar/Utils/PAMMMacros.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Demangle/Demangle.h" @@ -25,10 +27,7 @@ #include "llvm/Pass.h" #include "llvm/Support/raw_os_ostream.h" -#include "phasar/PhasarLLVM/Passes/GeneralStatisticsAnalysis.h" -#include "phasar/Utils/LLVMShorthands.h" -#include "phasar/Utils/Logger.h" -#include "phasar/Utils/PAMMMacros.h" +#include using namespace std; using namespace psr; @@ -107,8 +106,8 @@ GeneralStatisticsAnalysis::run(llvm::Module &M, const llvm::CallBase *CTor = llvm::cast(User); if (CTor->getCalledFunction() && - getNthFunctionArgument(CTor->getCalledFunction(), 0) - ->getType() == Cast->getDestTy()) { + CTor->getCalledFunction()->getArg(0)->getType() == + Cast->getDestTy()) { Stats.AllocatedTypes.insert( Cast->getDestTy()->getPointerElementType()); } diff --git a/lib/PhasarLLVM/Pointer/LLVMPointsToGraph.cpp b/lib/PhasarLLVM/Pointer/LLVMPointsToGraph.cpp index 76005f2858..2be8f7a0e4 100644 --- a/lib/PhasarLLVM/Pointer/LLVMPointsToGraph.cpp +++ b/lib/PhasarLLVM/Pointer/LLVMPointsToGraph.cpp @@ -25,8 +25,8 @@ #include "phasar/PhasarLLVM/Pointer/LLVMBasedPointsToAnalysis.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToGraph.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToUtils.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/GraphExtensions.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/NlohmannLogging.h" #include "phasar/Utils/PAMMMacros.h" diff --git a/lib/PhasarLLVM/Pointer/LLVMPointsToSet.cpp b/lib/PhasarLLVM/Pointer/LLVMPointsToSet.cpp index 802e6cfdfd..626a8d5155 100644 --- a/lib/PhasarLLVM/Pointer/LLVMPointsToSet.cpp +++ b/lib/PhasarLLVM/Pointer/LLVMPointsToSet.cpp @@ -41,7 +41,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToUtils.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/NlohmannLogging.h" diff --git a/lib/PhasarLLVM/TaintConfig/TaintConfig.cpp b/lib/PhasarLLVM/TaintConfig/TaintConfig.cpp index 5bc450d5fa..81d643df4d 100644 --- a/lib/PhasarLLVM/TaintConfig/TaintConfig.cpp +++ b/lib/PhasarLLVM/TaintConfig/TaintConfig.cpp @@ -33,9 +33,9 @@ #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" #include "phasar/PhasarLLVM/Utils/Annotation.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/IO.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/NlohmannLogging.h" diff --git a/lib/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.cpp b/lib/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.cpp index 29b0d58b91..356e53ccba 100644 --- a/lib/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.cpp +++ b/lib/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.cpp @@ -36,8 +36,8 @@ #include "phasar/Config/Configuration.h" #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/GraphExtensions.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/NlohmannLogging.h" #include "phasar/Utils/PAMMMacros.h" diff --git a/lib/PhasarLLVM/Utils/CMakeLists.txt b/lib/PhasarLLVM/Utils/CMakeLists.txt index bddbf49965..1c7a41c5a2 100644 --- a/lib/PhasarLLVM/Utils/CMakeLists.txt +++ b/lib/PhasarLLVM/Utils/CMakeLists.txt @@ -8,6 +8,8 @@ set(PHASAR_LINK_LIBS set(LLVM_LINK_COMPONENTS Core Support + BitWriter + Demangle ) # Handle the library files diff --git a/lib/Utils/LLVMCXXShorthands.cpp b/lib/PhasarLLVM/Utils/LLVMCXXShorthands.cpp similarity index 96% rename from lib/Utils/LLVMCXXShorthands.cpp rename to lib/PhasarLLVM/Utils/LLVMCXXShorthands.cpp index 8d367a71c3..102b0c2ec1 100644 --- a/lib/Utils/LLVMCXXShorthands.cpp +++ b/lib/PhasarLLVM/Utils/LLVMCXXShorthands.cpp @@ -3,7 +3,7 @@ #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/Instructions.h" -#include "phasar/Utils/LLVMCXXShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMCXXShorthands.h" #include "phasar/Utils/Logger.h" namespace psr { diff --git a/lib/Utils/LLVMIRToSrc.cpp b/lib/PhasarLLVM/Utils/LLVMIRToSrc.cpp similarity index 99% rename from lib/Utils/LLVMIRToSrc.cpp rename to lib/PhasarLLVM/Utils/LLVMIRToSrc.cpp index 513b4eaf60..8ec635a281 100644 --- a/lib/Utils/LLVMIRToSrc.cpp +++ b/lib/PhasarLLVM/Utils/LLVMIRToSrc.cpp @@ -26,7 +26,7 @@ #include "llvm/IR/Module.h" #include "llvm/IR/Value.h" -#include "phasar/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" using namespace psr; diff --git a/lib/Utils/LLVMShorthands.cpp b/lib/PhasarLLVM/Utils/LLVMShorthands.cpp similarity index 93% rename from lib/Utils/LLVMShorthands.cpp rename to lib/PhasarLLVM/Utils/LLVMShorthands.cpp index b8c794647f..4ab5ad4a4e 100644 --- a/lib/Utils/LLVMShorthands.cpp +++ b/lib/PhasarLLVM/Utils/LLVMShorthands.cpp @@ -39,7 +39,7 @@ #include "llvm/Support/raw_ostream.h" #include "phasar/Config/Configuration.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "phasar/Utils/Utilities.h" @@ -250,46 +250,6 @@ std::string getMetaDataID(const llvm::Value *V) { return "-1"; } -const llvm::Value *fromMetaDataId(const ProjectIRDB &IRDB, llvm::StringRef Id) { - if (Id.empty() || Id[0] == '-') { - return nullptr; - } - - auto ParseInt = [](llvm::StringRef Str) -> std::optional { - unsigned Num; - auto [Ptr, EC] = std::from_chars(Str.data(), Str.data() + Str.size(), Num); - - if (EC == std::errc{}) { - return Num; - } - - PHASAR_LOG_LEVEL(WARNING, "Invalid metadata id '" - << Str.str() << "': " - << std::make_error_code(EC).message()); - return std::nullopt; - }; - - if (auto Dot = Id.find('.'); Dot != llvm::StringRef::npos) { - auto FName = Id.slice(0, Dot); - - auto ArgNr = ParseInt(Id.drop_front(Dot + 1)); - - if (!ArgNr) { - return nullptr; - } - - const auto *F = IRDB.getFunction(FName); - if (F) { - return getNthFunctionArgument(F, *ArgNr); - } - - return nullptr; - } - - auto IdNr = ParseInt(Id); - return IdNr ? IRDB.getInstruction(*IdNr) : nullptr; -} - bool LLVMValueIDLess::operator()(const llvm::Value *Lhs, const llvm::Value *Rhs) const { std::string LhsId = getMetaDataID(Lhs); diff --git a/lib/Utils/CMakeLists.txt b/lib/Utils/CMakeLists.txt index eed0a9452c..b96de09def 100644 --- a/lib/Utils/CMakeLists.txt +++ b/lib/Utils/CMakeLists.txt @@ -7,7 +7,6 @@ if(PHASAR_ENABLE_PAMM STREQUAL "Off" AND NOT PHASAR_BUILD_UNITTESTS) endif() set(PHASAR_LINK_LIBS - phasar_config ) set(LLVM_LINK_COMPONENTS diff --git a/lib/Utils/PAMM.cpp b/lib/Utils/PAMM.cpp index 4abc09553a..96f4f42668 100644 --- a/lib/Utils/PAMM.cpp +++ b/lib/Utils/PAMM.cpp @@ -24,7 +24,6 @@ #include "nlohmann/json.hpp" -#include "phasar/Config/Configuration.h" #include "phasar/Utils/PAMM.h" using namespace psr; @@ -274,7 +273,8 @@ void PAMM::printMeasuredData(llvm::raw_ostream &Os) { Os << "\n----- END OF EVALUATION DATA -----\n\n"; } -void PAMM::exportMeasuredData(std::string OutputPath) { +void PAMM::exportMeasuredData(std::string OutputPath, + boost::program_options::variables_map &Config) { // json file for holding all data json JsonData; @@ -313,18 +313,15 @@ void PAMM::exportMeasuredData(std::string OutputPath) { // add analysis/project/source file information if available json JInfo; - if (PhasarConfig::VariablesMap().count("project-id")) { - JInfo["Project-ID"] = - PhasarConfig::VariablesMap()["project-id"].as(); + if (Config.count("project-id")) { + JInfo["Project-ID"] = Config["project-id"].as(); } - if (PhasarConfig::VariablesMap().count("module")) { - JInfo["Module(s)"] = - PhasarConfig::VariablesMap()["module"].as>(); + if (Config.count("module")) { + JInfo["Module(s)"] = Config["module"].as>(); } - if (PhasarConfig::VariablesMap().count("data-flow-analysis")) { + if (Config.count("data-flow-analysis")) { JInfo["Data-flow analysis"] = - PhasarConfig::VariablesMap()["data-flow-analysis"] - .as>(); + Config["data-flow-analysis"].as>(); } if (!JInfo.is_null()) { JsonData["Info"] = JInfo; diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFGTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFGTest.cpp index 80eaa58d02..4180e2cd4a 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFGTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFGTest.cpp @@ -7,7 +7,7 @@ #include "phasar/Config/Configuration.h" #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardCFG.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFGTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFGTest.cpp index 64acbe814c..6b309fb6f8 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFGTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFGTest.cpp @@ -6,7 +6,7 @@ #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedBackwardICFG.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedCFGTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedCFGTest.cpp index 50256adf5f..a4a9fa6414 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedCFGTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedCFGTest.cpp @@ -3,7 +3,7 @@ #include "phasar/Config/Configuration.h" #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instructions.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGExportTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGExportTest.cpp index 7d6010de81..5ab4df9ee3 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGExportTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGExportTest.cpp @@ -21,9 +21,9 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/PhasarPass/Options.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGGlobCtorDtorTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGGlobCtorDtorTest.cpp index be5df63d35..44744e87b4 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGGlobCtorDtorTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGGlobCtorDtorTest.cpp @@ -33,7 +33,7 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGTest.cpp index 7f36d5ca51..e02523188e 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGTest.cpp @@ -12,7 +12,7 @@ #include "phasar/PhasarLLVM/Pointer/LLVMPointsToInfo.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_CHATest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_CHATest.cpp index d4da41b4f5..7d18b004a0 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_CHATest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_CHATest.cpp @@ -7,7 +7,7 @@ #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_DTATest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_DTATest.cpp index 5be4023920..a8458ea6fd 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_DTATest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_DTATest.cpp @@ -5,7 +5,7 @@ #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_OTFTest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_OTFTest.cpp index eca69dfd13..2a9a233c93 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_OTFTest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_OTFTest.cpp @@ -5,7 +5,7 @@ #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "TestConfig.h" #include "llvm/Support/raw_ostream.h" diff --git a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_RTATest.cpp b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_RTATest.cpp index 2ce86f31a2..51e59924e3 100644 --- a/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_RTATest.cpp +++ b/unittests/PhasarLLVM/ControlFlow/LLVMBasedICFG_RTATest.cpp @@ -5,7 +5,7 @@ #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysisTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysisTest.cpp index dd30caa552..fa6f1f6ed0 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysisTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysisTest.cpp @@ -25,8 +25,8 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/BitVectorSet.h" -#include "phasar/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysisTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysisTest.cpp index 09aecfedcc..2a953e4f8d 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysisTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDELinearConstantAnalysisTest.cpp @@ -12,7 +12,7 @@ #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" #include "TestConfig.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace psr; diff --git a/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysisTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysisTest.cpp index af01406189..255819f186 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysisTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IFDSConstAnalysisTest.cpp @@ -11,7 +11,7 @@ #include "gtest/gtest.h" #include "TestConfig.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" using namespace std; using namespace psr; diff --git a/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoFullConstantPropagationTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoFullConstantPropagationTest.cpp index b1895bcee1..27471cfc9e 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoFullConstantPropagationTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoFullConstantPropagationTest.cpp @@ -25,7 +25,7 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoTaintAnalysisTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoTaintAnalysisTest.cpp index e33246e888..489f938cde 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoTaintAnalysisTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/Mono/InterMonoTaintAnalysisTest.cpp @@ -12,7 +12,7 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoFullConstantPropagationTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoFullConstantPropagationTest.cpp index fcb42a4855..7584d5d633 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoFullConstantPropagationTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoFullConstantPropagationTest.cpp @@ -23,7 +23,7 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoUninitVariablesTest.cpp b/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoUninitVariablesTest.cpp index 4dd30e3791..174f015ae8 100644 --- a/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoUninitVariablesTest.cpp +++ b/unittests/PhasarLLVM/DataFlowSolver/Mono/IntraMonoUninitVariablesTest.cpp @@ -23,7 +23,7 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/TaintConfig/TaintConfigTest.cpp b/unittests/PhasarLLVM/TaintConfig/TaintConfigTest.cpp index ca5e7fc25b..f1ad7e8f0f 100644 --- a/unittests/PhasarLLVM/TaintConfig/TaintConfigTest.cpp +++ b/unittests/PhasarLLVM/TaintConfig/TaintConfigTest.cpp @@ -13,7 +13,7 @@ #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/TaintConfig/TaintConfig.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" //===----------------------------------------------------------------------===// // Unit tests for the code annotation taint configuration diff --git a/unittests/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchyTest.cpp b/unittests/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchyTest.cpp index 815fb1a1fd..04b5a04a48 100644 --- a/unittests/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchyTest.cpp +++ b/unittests/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchyTest.cpp @@ -7,7 +7,7 @@ #include "phasar/Config/Configuration.h" #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Utilities.h" #include "TestConfig.h" diff --git a/unittests/PhasarLLVM/TypeHierarchy/TypeGraphTest.cpp b/unittests/PhasarLLVM/TypeHierarchy/TypeGraphTest.cpp index d7af3ca12b..53dc399a31 100644 --- a/unittests/PhasarLLVM/TypeHierarchy/TypeGraphTest.cpp +++ b/unittests/PhasarLLVM/TypeHierarchy/TypeGraphTest.cpp @@ -2,7 +2,7 @@ #include "phasar/DB/ProjectIRDB.h" #include "phasar/PhasarLLVM/Pointer/TypeGraphs/CachedTypeGraph.h" #include "phasar/PhasarLLVM/Pointer/TypeGraphs/LazyTypeGraph.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Utilities.h" #include "gtest/gtest.h" diff --git a/unittests/Utils/LLVMIRToSrcTest.cpp b/unittests/Utils/LLVMIRToSrcTest.cpp index febf76fbea..9fea39d1a4 100644 --- a/unittests/Utils/LLVMIRToSrcTest.cpp +++ b/unittests/Utils/LLVMIRToSrcTest.cpp @@ -11,8 +11,8 @@ #include "phasar/PhasarLLVM/Passes/ValueAnnotationPass.h" #include "phasar/PhasarLLVM/Pointer/LLVMPointsToSet.h" #include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h" -#include "phasar/Utils/LLVMIRToSrc.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMIRToSrc.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Logger.h" using namespace std; diff --git a/unittests/Utils/LLVMShorthandsTest.cpp b/unittests/Utils/LLVMShorthandsTest.cpp index bc2340fd54..333b48b02b 100644 --- a/unittests/Utils/LLVMShorthandsTest.cpp +++ b/unittests/Utils/LLVMShorthandsTest.cpp @@ -5,7 +5,7 @@ #include "phasar/Config/Configuration.h" #include "phasar/DB/ProjectIRDB.h" -#include "phasar/Utils/LLVMShorthands.h" +#include "phasar/PhasarLLVM/Utils/LLVMShorthands.h" #include "phasar/Utils/Utilities.h" #include "TestConfig.h" diff --git a/unittests/Utils/PAMMTest.cpp b/unittests/Utils/PAMMTest.cpp index 69180f3339..454f768d34 100644 --- a/unittests/Utils/PAMMTest.cpp +++ b/unittests/Utils/PAMMTest.cpp @@ -1,9 +1,12 @@ #include "phasar/Utils/PAMM.h" +#include "phasar/Config/Configuration.h" + #include "gtest/gtest.h" -#include #include "llvm/Support/raw_ostream.h" +#include + using namespace psr; /* Test fixture */ @@ -100,7 +103,7 @@ TEST_F(PAMMTest, HandleJSONOutput) { Pamm.addToHistogram("Test-Set", "2"); Pamm.incCounter("setOpCount", 9); Pamm.stopTimer("timer3"); - Pamm.exportMeasuredData("HandleJSONOutputTest"); + Pamm.exportMeasuredData("HandleJSONOutputTest", PhasarConfig::VariablesMap()); } TEST_F(PAMMTest, DISABLED_PerformanceTimerBasic) {