Skip to content

Commit 0228449

Browse files
committed
Various fixes (debug macro, linked)
Fixes debug macro declaraion Fixes debug macro usages Fixes thread linking for controller and phasar pass
1 parent 254626b commit 0228449

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/FlowEdgeFunctionCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class FlowEdgeFunctionCache {
283283
PHASAR_LOG_LEVEL(DEBUG, "(F) Callee's : "); for (auto callee
284284
: Callees) {
285285
PHASAR_LOG_LEVEL(DEBUG, " " << Problem.FtoString(callee));
286-
};)
286+
});
287287
auto Key = std::tie(CallSite, RetSite, Callees);
288288
auto SearchCallToRetFlowFunction = CallToRetFlowFunctionCache.find(Key);
289289
if (SearchCallToRetFlowFunction != CallToRetFlowFunctionCache.end()) {

include/phasar/Utils/Logger.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class Logger final {
9191
const std::variant<StdStream, std::string> &StreamVariant);
9292
};
9393

94+
#define IF_LOG_ENABLED(computation) \
95+
IF_LOG_ENABLED_BOOL(Logger::isLoggingEnabled(), computation)
96+
9497
#ifdef DYNAMIC_LOG
9598

9699
#define PHASAR_LOG(message) PHASAR_LOG_LEVEL(DEBUG, message)
@@ -136,12 +139,6 @@ class Logger final {
136139
computation; \
137140
}
138141

139-
// #define LOG_IF_ENABLE(computation) \
140-
// IF_LOG_ENABLED_BOOL(Logger::isLoggingEnabled(), computation)
141-
142-
#define IF_LOG_ENABLED(computation) \
143-
IF_LOG_ENABLED_BOOL(Logger::isLoggingEnabled(), computation)
144-
145142
#define IS_LOG_ENABLED Logger::isLoggingEnabled()
146143

147144
#else

lib/Controller/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ endif()
3232
target_link_libraries(phasar_controller
3333
LINK_PUBLIC
3434
curl
35+
${CMAKE_THREAD_LIBS_INIT}
3536
${PHASAR_STD_FILESYSTEM}
3637
)
3738

lib/PhasarLLVM/Passes/GeneralStatisticsAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ GeneralStatisticsAnalysis::run(llvm::Module &M,
177177
llvm::raw_string_ostream Rso(TypeStr);
178178
Type->print(Rso);
179179
PHASAR_LOG_LEVEL(INFO, " " << Rso.str());
180-
})
180+
});
181181
// now we are done and can return the results
182182
return Stats;
183183
}

lib/PhasarLLVM/TypeHierarchy/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set(PHASAR_LINK_LIBS
66

77
set(LLVM_LINK_COMPONENTS
88
Core
9+
Demangle
910
Support
1011
Analysis
1112
)

lib/PhasarPass/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ endif()
3636
find_package(Boost COMPONENTS graph program_options REQUIRED)
3737
target_link_libraries(phasar_pass
3838
LINK_PUBLIC
39+
${CMAKE_THREAD_LIBS_INIT}
3940
${PHASAR_LINK_LIBS}
4041
${Boost_LIBRARIES}
4142
)

0 commit comments

Comments
 (0)