Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ else()
set(PHASAR_BUILD_OPTIONAL_TARGETS_DEFAULT OFF)
endif()

option(PHASAR_EXPERIMENTAL_CXX20 "Build phasar in C++20 mode. This is an experimental feature" OFF)
if(PHASAR_EXPERIMENTAL_CXX20)
message(DEPRECATION "The option PHASAR_EXPERIMENTAL_CXX20 is deprecated and will be removed in a future version of PhASAR. Use CMAKE_CXX_STANDARD=20 instead.")
set(CMAKE_CXX_STANDARD 20)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down
14 changes: 0 additions & 14 deletions Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,9 @@ foreach(component ${phasar_FIND_COMPONENTS})
endforeach()

if (NOT DEFINED phasar_FOUND OR phasar_FOUND EQUAL TRUE)
foreach(component ${phasar_FIND_COMPONENTS})
# For backwards compatibility -- will be removed with next release
add_library(phasar::phasar_${component} ALIAS phasar::${component})
endforeach()

if (NOT phasar_FIND_COMPONENTS)
list(APPEND PHASAR_NEEDED_LIBS phasar::phasar)
# Default target
add_library(phasar ALIAS phasar::phasar)
endif()

function(phasar_config executable)
message(DEPRECATION "The function 'phasar_config' is deprecated. Use target_link_libraries(${executable} PUBLIC phasar::phasar) instead!")

target_link_libraries(${executable}
PUBLIC
${PHASAR_NEEDED_LIBS}
)
endfunction()
endif()
5 changes: 1 addition & 4 deletions examples/use-phasar-as-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ add_executable(myphasartool
myphasartool.cpp
)

# Old way using phasar_config (deprecated):
# phasar_config(myphasartool)

# New way using target_link_libraries:
# Link your tool against phasar:
target_link_libraries(myphasartool phasar::llvm_ifdside)

# If find_package did not specify components:
Expand Down
4 changes: 2 additions & 2 deletions include/phasar/AnalysisStrategy/AnalysisSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "phasar/PhasarLLVM/ControlFlow/LLVMBasedICFG.h"
#include "phasar/PhasarLLVM/Pointer/LLVMAliasSet.h"
#include "phasar/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.h"
#include "phasar/PhasarLLVM/TypeHierarchy/DIBasedTypeHierarchy.h"

namespace psr {

Expand All @@ -29,7 +29,7 @@ struct AnalysisSetup {
struct DefaultAnalysisSetup : AnalysisSetup {
using PointerAnalysisTy = LLVMAliasSet;
using CallGraphAnalysisTy = LLVMBasedICFG;
using TypeHierarchyTy = LLVMTypeHierarchy;
using TypeHierarchyTy = DIBasedTypeHierarchy;
};

} // namespace psr
Expand Down
23 changes: 0 additions & 23 deletions include/phasar/Config/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,6 @@ class PhasarConfig {
// NOLINTNEXTLINE(readability-identifier-naming)
[[nodiscard]] static llvm::StringRef PhasarDirectory() noexcept;

/// Name of the file storing all standard header search paths used for
/// compilation.
[[nodiscard, deprecated("This ancient API is broken and should not be used "
"anymore")]] static constexpr llvm::StringRef
// NOLINTNEXTLINE(readability-identifier-naming)
HeaderSearchPathsFileName() noexcept {
return "standard_header_paths.conf";
}

/// Name of the compile_commands.json file (in case we wish to rename)
[[nodiscard, deprecated("This ancient API is broken and should not be used "
"anymore")]] static constexpr llvm::StringRef
// NOLINTNEXTLINE(readability-identifier-naming)
CompileCommandsJson() noexcept {
return "compile_commands.json";
}

/// Default Source- and Sink-Functions path
[[nodiscard, deprecated("This ancient API is broken and should not be used "
"anymore")]] static llvm::StringRef
// NOLINTNEXTLINE(readability-identifier-naming)
DefaultSourceSinkFunctionsPath() noexcept;

// Variables to be used in JSON export format
/// Identifier for call graph export
// NOLINTNEXTLINE(readability-identifier-naming)
Expand Down
12 changes: 0 additions & 12 deletions include/phasar/Config/Version.h

This file was deleted.

6 changes: 0 additions & 6 deletions include/phasar/ControlFlow/CFGBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "phasar/Utils/ByRef.h"
#include "phasar/Utils/TypeTraits.h"

#include "nlohmann/json.hpp"

namespace psr {

enum class SpecialMemberFunctionType;
Expand Down Expand Up @@ -131,10 +129,6 @@ template <typename Derived> class CFGBase {
void print(ByConstRef<f_t> Fun, llvm::raw_ostream &OS) const {
self().printImpl(Fun, OS);
}
[[nodiscard, deprecated("Please use printAsJson() instead")]] nlohmann::json
getAsJson(ByConstRef<f_t> Fun) const {
return self().getAsJsonImpl(Fun);
}

protected:
Derived &self() noexcept { return static_cast<Derived &>(*this); }
Expand Down
24 changes: 0 additions & 24 deletions include/phasar/ControlFlow/CallGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@

#include "llvm/IR/Function.h"

#include "nlohmann/json.hpp"

#include <functional>
#include <string>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -105,27 +102,6 @@ class CallGraph : public CallGraphBase<CallGraph<N, F>> {
CGData.printAsJson(OS);
}

/// Creates a JSON representation of this call-graph suitable for presistent
/// storage.
/// Use the ctor taking a json object for deserialization
template <typename FunctionIdGetter, typename InstIdGetter>
[[nodiscard]] [[deprecated(
"Please use printAsJson() instead")]] nlohmann::json
getAsJson(FunctionIdGetter GetFunctionId,
InstIdGetter GetInstructionId) const {
nlohmann::json J;

for (const auto &[Fun, Callers] : CallersOf) {
auto &JCallers = J[std::invoke(GetFunctionId, Fun)];

for (const auto &CS : *Callers) {
JCallers.push_back(std::invoke(GetInstructionId, CS));
}
}

return J;
}

template <typename FunctionLabelGetter, typename InstParentGetter,
typename InstLabelGetter>
void printAsDot(llvm::raw_ostream &OS, FunctionLabelGetter GetFunctionLabel,
Expand Down
1 change: 0 additions & 1 deletion include/phasar/ControlFlow/CallGraphAnalysisType.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
CALL_GRAPH_ANALYSIS_TYPE(NORESOLVE, "nores", "Don't resolve indirect- and virtual calls")
CALL_GRAPH_ANALYSIS_TYPE(CHA, "cha", "Class hierarchy analysis")
CALL_GRAPH_ANALYSIS_TYPE(RTA, "rta", "Rapid type analysis")
CALL_GRAPH_ANALYSIS_TYPE(DTA, "dta", "Declared type analysis")
CALL_GRAPH_ANALYSIS_TYPE(VTA, "vta", "Variable type analysis")
CALL_GRAPH_ANALYSIS_TYPE(OTF, "otf", "On-the-fly analysis based on points-to info (default)")

Expand Down
9 changes: 0 additions & 9 deletions include/phasar/ControlFlow/ICFGBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"

#include "nlohmann/json.hpp"

#include <type_traits>

namespace psr {
Expand Down Expand Up @@ -112,13 +110,6 @@ template <typename Derived> class ICFGBase {
self().printAsJsonImpl(OS);
}

/// Returns the underlying call-graph as JSON
[[nodiscard]] [[deprecated(
"Please use printAsJson() instead")]] nlohmann::json
getAsJson() const {
return self().getAsJsonImpl();
}

[[nodiscard]] size_t getNumCallSites() const noexcept {
return self().getNumCallSitesImpl();
}
Expand Down
Loading
Loading