We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2979402 commit 60935dfCopy full SHA for 60935df
Sources/llvmshims/src/shim.cpp
@@ -146,9 +146,8 @@ LLVMBinaryType LLVMBinaryGetType(LLVMBinaryRef BR) {
146
}
147
148
LLVMBinaryRef LLVMCreateBinary(LLVMMemoryBufferRef MemBuf, LLVMContextRef Context, char **ErrorMessage) {
149
- std::unique_ptr<llvm::MemoryBuffer> Buf(unwrap(MemBuf));
150
Expected<std::unique_ptr<Binary>> ObjOrErr(
151
- createBinary(Buf->getMemBufferRef(), unwrap(Context)));
+ createBinary(unwrap(MemBuf)->getMemBufferRef(), unwrap(Context)));
152
if (!ObjOrErr) {
153
*ErrorMessage = strdup(toString(ObjOrErr.takeError()).c_str());
154
return nullptr;
0 commit comments