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

Method preProcessBCs

svf-llvm/lib/LLVMModule.cpp:295–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295void LLVMModuleSet::preProcessBCs(std::vector<std::string> &moduleNameVec)
296{
297 LLVMModuleSet* mset = getLLVMModuleSet();
298 mset->loadModules(moduleNameVec);
299 mset->loadExtAPIModules();
300 mset->prePassSchedule();
301
302 std::string preProcessSuffix = ".pre.bc";
303 // Get the existing module names, remove old extension, add preProcessSuffix
304 for (u32_t i = 0; i < moduleNameVec.size(); i++)
305 {
306 u32_t lastIndex = moduleNameVec[i].find_last_of(".");
307 std::string rawName = moduleNameVec[i].substr(0, lastIndex);
308 moduleNameVec[i] = (rawName + preProcessSuffix);
309 }
310
311 mset->dumpModulesToFile(preProcessSuffix);
312 preProcessed = true;
313 releaseLLVMModuleSet();
314}
315
316void LLVMModuleSet::loadModules(const std::vector<std::string> &moduleNameVec)
317{

Callers

nothing calls this directly

Calls 5

loadModulesMethod · 0.80
loadExtAPIModulesMethod · 0.80
prePassScheduleMethod · 0.80
dumpModulesToFileMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected