MCPcopy Create free account
hub / github.com/SVF-tools/SVF / getFilePath

Function getFilePath

svf/lib/Util/ExtAPI.cpp:99–119  ·  view source on GitHub ↗

Get extapi.bc file path in npm

Source from the content-addressed store, hash-verified

97
98// Get extapi.bc file path in npm
99static std::string getFilePath(const std::string& path)
100{
101 std::string bcFilePath = "";
102 if (path.compare("SVF_DIR") == 0)
103 {
104 char const* svfdir = getenv("SVF_DIR");
105 if (svfdir)
106 bcFilePath = svfdir;
107 if (!bcFilePath.empty() && bcFilePath.back() != '/')
108 bcFilePath.push_back('/');
109 bcFilePath.append(SVF_BUILD_TYPE "-build").append("/lib/extapi.bc");
110 }
111 else if (path.compare("npm root") == 0)
112 {
113 bcFilePath = GetStdoutFromCommand(path);
114 if (!bcFilePath.empty() && bcFilePath.back() != '/')
115 bcFilePath.push_back('/');
116 bcFilePath.append("SVF/lib/extapi.bc");
117 }
118 return bcFilePath;
119}
120
121// This function returns the absolute path of the current module:
122// - If SVF is built and loaded as a dynamic library (e.g., libSVFCore.so or .dylib), it returns the path to that shared object file.

Callers 1

getExtBcPathMethod · 0.85

Calls 5

getenvFunction · 0.85
GetStdoutFromCommandFunction · 0.85
compareMethod · 0.80
emptyMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected