llvm.org GIT mirror llvm / 075a8ce
Rename createIRObjectFile to just create. It is a static method of IRObjectFile, so having to use IRObjectFile::createIRObjectFile was redundant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223822 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
4 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
6464 static ErrorOr
6565 findBitcodeInMemBuffer(MemoryBufferRef Object);
6666
67 static ErrorOr>
68 createIRObjectFile(MemoryBufferRef Object, LLVMContext &Context);
67 static ErrorOr> create(MemoryBufferRef Object,
68 LLVMContext &Context);
6969 };
7070 }
7171 }
289289 }
290290
291291 ErrorOr>
292 llvm::object::IRObjectFile::createIRObjectFile(MemoryBufferRef Object,
293 LLVMContext &Context) {
292 llvm::object::IRObjectFile::create(MemoryBufferRef Object,
293 LLVMContext &Context) {
294294 ErrorOr BCOrErr = findBitcodeInMemBuffer(Object);
295295 if (!BCOrErr)
296296 return BCOrErr.getError();
3232 switch (Type) {
3333 case sys::fs::file_magic::bitcode:
3434 if (Context)
35 return IRObjectFile::createIRObjectFile(Object, *Context);
35 return IRObjectFile::create(Object, *Context);
3636 // Fallthrough
3737 case sys::fs::file_magic::unknown:
3838 case sys::fs::file_magic::archive:
6868 if (!BCData)
6969 return std::move(Obj);
7070
71 return IRObjectFile::createIRObjectFile(
71 return IRObjectFile::create(
7272 MemoryBufferRef(BCData->getBuffer(), Object.getBufferIdentifier()),
7373 *Context);
7474 }
302302 }
303303
304304 ErrorOr> ObjOrErr =
305 object::IRObjectFile::createIRObjectFile(BufferRef, Context);
305 object::IRObjectFile::create(BufferRef, Context);
306306 std::error_code EC = ObjOrErr.getError();
307307 if (EC == BitcodeError::InvalidBitcodeSignature ||
308308 EC == object::object_error::invalid_file_type ||
562562
563563 MemoryBufferRef BufferRef(StringRef((const char *)View, File.filesize), "");
564564 ErrorOr> ObjOrErr =
565 object::IRObjectFile::createIRObjectFile(BufferRef, Context);
565 object::IRObjectFile::create(BufferRef, Context);
566566
567567 if (std::error_code EC = ObjOrErr.getError())
568568 message(LDPL_FATAL, "Could not read bitcode from file : %s",