MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / linkBitcodeFile

Method linkBitcodeFile

src/compiler/llvm-to-backend/LLVMToBackend.cpp:590–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588}
589
590bool LLVMToBackendTranslator::linkBitcodeFile(llvm::Module &M, const std::string &BitcodeFile,
591 const std::string &ForcedTriple,
592 const std::string &ForcedDataLayout,
593 bool LinkOnlyNeeded) {
594 auto F = llvm::MemoryBuffer::getFile(BitcodeFile);
595 if(auto Err = F.getError()) {
596 this->registerError("LLVMToBackend: Could not open file " + BitcodeFile);
597 return false;
598 }
599 HIPSYCL_DEBUG_INFO << "LLVMToBackend: Linking with bitcode file: " << BitcodeFile << "\n";
600 return linkBitcodeString(M, std::string{F.get()->getBuffer()}, ForcedTriple, ForcedDataLayout,
601 LinkOnlyNeeded);
602}
603
604void LLVMToBackendTranslator::specializeKernelArgument(const std::string &KernelName, int ParamIndex,
605 const void *ValueBuffer) {

Callers 5

toBackendFlavorMethod · 0.80
toBackendFlavorMethod · 0.80
toBackendFlavorMethod · 0.80
clangJitLinkMethod · 0.80
toBackendFlavorMethod · 0.80

Calls 2

registerErrorMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected