MCPcopy Create free account
hub / github.com/GANGE666/xVMP / notifyObjectCompiled

Method notifyObjectCompiled

src/tools/lli/lli.cpp:248–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 ~LLIObjectCache() override {}
247
248 void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj) override {
249 const std::string &ModuleID = M->getModuleIdentifier();
250 std::string CacheName;
251 if (!getCacheFilename(ModuleID, CacheName))
252 return;
253 if (!CacheDir.empty()) { // Create user-defined cache dir.
254 SmallString<128> dir(sys::path::parent_path(CacheName));
255 sys::fs::create_directories(Twine(dir));
256 }
257 std::error_code EC;
258 raw_fd_ostream outfile(CacheName, EC, sys::fs::F_None);
259 outfile.write(Obj.getBufferStart(), Obj.getBufferSize());
260 outfile.close();
261 }
262
263 std::unique_ptr<MemoryBuffer> getObject(const Module* M) override {
264 const std::string &ModuleID = M->getModuleIdentifier();

Callers 1

emitObjectMethod · 0.45

Calls 9

parent_pathFunction · 0.85
create_directoriesFunction · 0.85
getModuleIdentifierMethod · 0.80
TwineClass · 0.50
emptyMethod · 0.45
writeMethod · 0.45
getBufferStartMethod · 0.45
getBufferSizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected