#include "SVF-LLVM/SVFIRBuilder.h"
#include "Util/CommandLine.h"
#include "Util/Options.h"
#include <iostream>
#include <string>
Go to the source code of this file.
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 53 of file llvm2svf.cpp.
54{
56 argc, argv, "llvm2svf", "[options] <input-bitcode...>");
57
59
60
61 assert(false && "Please implement SVFIRWriter::writeJsonToPath");
62 SVFUtil::outs() <<
"SVF IR is written to '" << jsonPath <<
"'\n";
64 return 0;
65}
static std::vector< std::string > parseOptions(int argc, char *argv[], std::string description, std::string callFormat)
static void releaseLLVMModuleSet()
std::string replaceExtension(const std::string &path)
std::ostream & outs()
Overwrite llvm::outs().
◆ replaceExtension()
Definition at line 41 of file llvm2svf.cpp.
42{
43 size_t pos = path.rfind('.');
44 if (pos == std::string::npos ||
45 (path.substr(pos) != ".bc" && path.substr(pos) != ".ll"))
46 {
47 SVFUtil::errs() <<
"Error: expect file with extension .bc or .ll\n";
48 exit(EXIT_FAILURE);
49 }
50 return path.substr(0, pos) + ".svf.json";
51}
std::ostream & errs()
Overwrite llvm::errs().