/* Builds a module from the bitcode in the specified memory buffer, returning a
reference to the module via the OutModule parameter. Returns 0 on success.
Optionally returns a human-readable error message via OutMessage. */
-LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf,
- LLVMModuleRef *OutModule, char **OutMessage) {
+LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule,
+ char **OutMessage) {
return LLVMParseBitcodeInContext(wrap(&getGlobalContext()), MemBuf, OutModule,
OutMessage);
}
if (ModuleOrErr.getError()) {
if (OutMessage)
*OutMessage = strdup(Message.c_str());
- *OutModule = wrap((Module*)nullptr);
+ *OutModule = wrap((Module *)nullptr);
return 1;
}
Optionally returns a human-readable error message via OutMessage. */
LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
LLVMMemoryBufferRef MemBuf,
- LLVMModuleRef *OutM,
- char **OutMessage) {
+ LLVMModuleRef *OutM, char **OutMessage) {
LLVMContext &Ctx = *unwrap(ContextRef);
LLVMContext::DiagnosticHandlerTy OldDiagnosticHandler =
Ctx.getDiagnosticHandler();
*OutM = wrap(ModuleOrErr.get().release());
return 0;
-
}
LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,