From 075a8cee5d2e15e52e5a30bf8a4541896a0d717c 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223822 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/IRObjectFile.h | 4 ++-- lib/Object/IRObjectFile.cpp | 4 ++-- lib/Object/SymbolicFile.cpp | 4 ++-- tools/gold/gold-plugin.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/llvm/Object/IRObjectFile.h b/include/llvm/Object/IRObjectFile.h index 3a6edd0ab7c..74f46667ce6 100644 --- a/include/llvm/Object/IRObjectFile.h +++ b/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/lib/Object/IRObjectFile.cpp b/lib/Object/IRObjectFile.cpp index 185b783e350..d9e461050ed 100644 --- a/lib/Object/IRObjectFile.cpp +++ b/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/lib/Object/SymbolicFile.cpp b/lib/Object/SymbolicFile.cpp index ffd3dbcdb0d..de98a1228cd 100644 --- a/lib/Object/SymbolicFile.cpp +++ b/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/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 2cb181eca38..25283624735 100644 --- a/tools/gold/gold-plugin.cpp +++ b/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.34.1