Skip to content

Commit 4b1cf13

Browse files
Apply suggestions from automatic code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1b18828 commit 4b1cf13

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

include/phasar/DB/ProjectIRDB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "llvm/IR/PassManager.h"
2222
#include "llvm/Passes/PassBuilder.h"
2323

24-
#include "phasar/Utils/EnumFlags.h"
2524
#include "nlohmann/json.hpp"
25+
#include "phasar/Utils/EnumFlags.h"
2626

2727
namespace llvm {
2828
class Value;

include/phasar/PhasarLLVM/Passes/GeneralStatisticsAnalysis.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
#include <set>
2121

22-
#include "llvm/IR/PassManager.h"
2322
#include "nlohmann/json.hpp"
23+
#include "llvm/IR/PassManager.h"
2424

2525
namespace llvm {
2626
class Type;
@@ -117,7 +117,6 @@ class GeneralStatistics {
117117
[[nodiscard]] std::set<const llvm::Instruction *>
118118
getRetResInstructions() const;
119119
[[nodiscard]] nlohmann::json getAsJson() const;
120-
121120
};
122121

123122
/**

lib/PhasarLLVM/Passes/GeneralStatisticsAnalysis.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,14 @@ GeneralStatistics::getRetResInstructions() const {
216216
return RetResInstructions;
217217
}
218218

219-
nlohmann::json GeneralStatistics::getAsJson() const {
220-
nlohmann::json J;
221-
J["Instructions"] = getInstructions();
222-
J["Functions"] = Functions;
223-
J["Alloca Instructions"] = AllocaInstructions.size();
224-
J["Call Sites"] = CallSites;
225-
J["Global Variables"] = Globals;
226-
return J;
227-
}
219+
nlohmann::json GeneralStatistics::getAsJson() const {
220+
nlohmann::json J;
221+
J["Instructions"] = getInstructions();
222+
J["Functions"] = Functions;
223+
J["Alloca Instructions"] = AllocaInstructions.size();
224+
J["Call Sites"] = CallSites;
225+
J["Global Variables"] = Globals;
226+
return J;
227+
}
228228

229229
} // namespace psr

tools/phasar-llvm/phasar-llvm.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,10 @@ int main(int Argc, const char **Argv) {
320320
llvm::outs() << "> functions:\t\t" << IRDB.getWPAModule()->size() << "\n";
321321
llvm::outs() << "> global variables:\t"
322322
<< IRDB.getWPAModule()->global_size() << "\n";
323-
llvm::outs() << "> Alloca instructions:\t" << IRDB.getAllocaInstructions().size() << "\n";
324-
llvm::outs() << "> Memory Locations:\t" << IRDB.getAllMemoryLocations().size() << "\n";
323+
llvm::outs() << "> Alloca instructions:\t"
324+
<< IRDB.getAllocaInstructions().size() << "\n";
325+
llvm::outs() << "> Memory Locations:\t"
326+
<< IRDB.getAllMemoryLocations().size() << "\n";
325327
llvm::outs() << "> Call Sites:\t" << IRDB.getNumCallsites() << "\n";
326328
}
327329

0 commit comments

Comments
 (0)