99
1010#include < filesystem>
1111#include < fstream>
12- #include < iostream>
1312
1413#include " phasar/DB/ProjectIRDB.h"
1514#include " phasar/PhasarLLVM/AnalysisStrategy/WholeProgramAnalysis.h"
@@ -31,12 +30,11 @@ using namespace psr;
3130int main (int argc, const char **argv) {
3231 if (argc < 2 || !std::filesystem::exists (argv[1 ]) ||
3332 std::filesystem::is_directory (argv[1 ])) {
34- std::cerr << " myphasartool\n "
35- " A small PhASAR-based example program\n\n "
36- " Usage: myphasartool <LLVM IR file>\n " ;
33+ llvm::errs () << " myphasartool\n "
34+ " A small PhASAR-based example program\n\n "
35+ " Usage: myphasartool <LLVM IR file>\n " ;
3736 return 1 ;
3837 }
39- initializeLogger (false );
4038 ProjectIRDB DB ({argv[1 ]});
4139 if (auto F = DB.getFunctionDefinition (" main" )) {
4240 LLVMTypeHierarchy H (DB);
@@ -49,21 +47,21 @@ int main(int argc, const char **argv) {
4947 // print inter-procedural control-flow graph
5048 I.print ();
5149 // IFDS template parametrization test
52- std::cout << " Testing IFDS:\n " ;
50+ llvm::outs () << " Testing IFDS:\n " ;
5351 IFDSLinearConstantAnalysis L (&DB, &H, &I, &P, {" main" });
5452 IFDSSolver_P<IFDSLinearConstantAnalysis> S (L);
5553 S.solve ();
5654 S.dumpResults ();
5755 // use PhASAR's strategy concept that allows for even easier analysis set-up
58- std::cout << " Testing IDE:\n " ;
56+ llvm::outs () << " Testing IDE:\n " ;
5957 WholeProgramAnalysis<IDESolver_P<IDELinearConstantAnalysis>,
6058 IDELinearConstantAnalysis>
6159 WPA (DB, {" main" }, &P, &I, &H);
6260 WPA.solve ();
6361 WPA.dumpResults ();
6462 WPA.releaseAllHelperAnalyses ();
6563 } else {
66- std::cerr << " error: file does not contain a 'main' function!\n " ;
64+ llvm::errs () << " error: file does not contain a 'main' function!\n " ;
6765 }
6866 return 0 ;
6967}
0 commit comments