MCPcopy Create free account
hub / github.com/agraef/pure-lang / ParseBitcodeFile

Function ParseBitcodeFile

pure/interpreter.cc:1885–1896  ·  view source on GitHub ↗

We have parseBitcodeFile(), this is in LLVM 3.5 and later. Must emulate ParseBitcodeFile.

Source from the content-addressed store, hash-verified

1883// We have parseBitcodeFile(), this is in LLVM 3.5 and later. Must emulate
1884// ParseBitcodeFile.
1885static llvm::Module *ParseBitcodeFile(llvm::MemoryBuffer *Buffer,
1886 llvm::LLVMContext& Context,
1887 std::string *ErrMsg)
1888{
1889 using namespace llvm;
1890 ErrorOr<Module *> ModuleOrErr = parseBitcodeFile(Buffer, Context);
1891 if (error_code EC = ModuleOrErr.getError()) {
1892 if (ErrMsg) *ErrMsg = EC.message();
1893 return 0;
1894 } else
1895 return ModuleOrErr.get();
1896}
1897#endif
1898
1899bool interpreter::LoadFaustDSP(bool priv, const char *name, string *msg,

Callers 2

LoadFaustDSPMethod · 0.85
LoadBitcodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected