From 5dec7eaae2b3021b0858b5346c96f6b0001e3712 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 9 Dec 2014 20:36:13 +0000 Subject: [PATCH] Rename createIRObjectFile to just create. It is a static method of IRObjectFile, so having to use IRObjectFile::createIRObjectFile was redundant. llvm-svn: 223822 --- llvm/include/llvm/Object/IRObjectFile.h | 4 ++-- llvm/lib/Object/IRObjectFile.cpp | 4 ++-- llvm/lib/Object/SymbolicFile.cpp | 4 ++-- llvm/tools/gold/gold-plugin.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/Object/IRObjectFile.h b/llvm/include/llvm/Object/IRObjectFile.h index 3a6edd0..74f4666 100644 --- a/llvm/include/llvm/Object/IRObjectFile.h +++ b/llvm/include/llvm/Object/IRObjectFile.h @@ -65,8 +65,8 @@ public: static ErrorOr findBitcodeInMemBuffer(MemoryBufferRef Object); - static ErrorOr> - createIRObjectFile(MemoryBufferRef Object, LLVMContext &Context); + static ErrorOr> create(MemoryBufferRef Object, + LLVMContext &Context); }; } } diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp index 185b783..d9e4610 100644 --- a/llvm/lib/Object/IRObjectFile.cpp +++ b/llvm/lib/Object/IRObjectFile.cpp @@ -290,8 +290,8 @@ ErrorOr IRObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Ob } ErrorOr> -llvm::object::IRObjectFile::createIRObjectFile(MemoryBufferRef Object, - LLVMContext &Context) { +llvm::object::IRObjectFile::create(MemoryBufferRef Object, + LLVMContext &Context) { ErrorOr BCOrErr = findBitcodeInMemBuffer(Object); if (!BCOrErr) return BCOrErr.getError(); diff --git a/llvm/lib/Object/SymbolicFile.cpp b/llvm/lib/Object/SymbolicFile.cpp index ffd3dbc..de98a12 100644 --- a/llvm/lib/Object/SymbolicFile.cpp +++ b/llvm/lib/Object/SymbolicFile.cpp @@ -33,7 +33,7 @@ ErrorOr> SymbolicFile::createSymbolicFile( switch (Type) { case sys::fs::file_magic::bitcode: if (Context) - return IRObjectFile::createIRObjectFile(Object, *Context); + return IRObjectFile::create(Object, *Context); // Fallthrough case sys::fs::file_magic::unknown: case sys::fs::file_magic::archive: @@ -69,7 +69,7 @@ ErrorOr> SymbolicFile::createSymbolicFile( if (!BCData) return std::move(Obj); - return IRObjectFile::createIRObjectFile( + return IRObjectFile::create( MemoryBufferRef(BCData->getBuffer(), Object.getBufferIdentifier()), *Context); } diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 2cb181e..2528362 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -303,7 +303,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file, } ErrorOr> ObjOrErr = - object::IRObjectFile::createIRObjectFile(BufferRef, Context); + object::IRObjectFile::create(BufferRef, Context); std::error_code EC = ObjOrErr.getError(); if (EC == BitcodeError::InvalidBitcodeSignature || EC == object::object_error::invalid_file_type || @@ -563,7 +563,7 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile, MemoryBufferRef BufferRef(StringRef((const char *)View, File.filesize), ""); ErrorOr> ObjOrErr = - object::IRObjectFile::createIRObjectFile(BufferRef, Context); + object::IRObjectFile::create(BufferRef, Context); if (std::error_code EC = ObjOrErr.getError()) message(LDPL_FATAL, "Could not read bitcode from file : %s", -- 2.7.4