[llvm] r223822 - Rename createIRObjectFile to just create.
Rafael Espindola
rafael.espindola at gmail.com
Tue Dec 9 12:36:13 PST 2014
Author: rafael
Date: Tue Dec 9 14:36:13 2014
New Revision: 223822
URL: http://llvm.org/viewvc/llvm-project?rev=223822&view=rev
Log:
Rename createIRObjectFile to just create.
It is a static method of IRObjectFile, so having to use
IRObjectFile::createIRObjectFile was redundant.
Modified:
llvm/trunk/include/llvm/Object/IRObjectFile.h
llvm/trunk/lib/Object/IRObjectFile.cpp
llvm/trunk/lib/Object/SymbolicFile.cpp
llvm/trunk/tools/gold/gold-plugin.cpp
Modified: llvm/trunk/include/llvm/Object/IRObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/IRObjectFile.h?rev=223822&r1=223821&r2=223822&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/IRObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/IRObjectFile.h Tue Dec 9 14:36:13 2014
@@ -65,8 +65,8 @@ public:
static ErrorOr<MemoryBufferRef>
findBitcodeInMemBuffer(MemoryBufferRef Object);
- static ErrorOr<std::unique_ptr<IRObjectFile>>
- createIRObjectFile(MemoryBufferRef Object, LLVMContext &Context);
+ static ErrorOr<std::unique_ptr<IRObjectFile>> create(MemoryBufferRef Object,
+ LLVMContext &Context);
};
}
}
Modified: llvm/trunk/lib/Object/IRObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/IRObjectFile.cpp?rev=223822&r1=223821&r2=223822&view=diff
==============================================================================
--- llvm/trunk/lib/Object/IRObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/IRObjectFile.cpp Tue Dec 9 14:36:13 2014
@@ -290,8 +290,8 @@ ErrorOr<MemoryBufferRef> IRObjectFile::f
}
ErrorOr<std::unique_ptr<IRObjectFile>>
-llvm::object::IRObjectFile::createIRObjectFile(MemoryBufferRef Object,
- LLVMContext &Context) {
+llvm::object::IRObjectFile::create(MemoryBufferRef Object,
+ LLVMContext &Context) {
ErrorOr<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object);
if (!BCOrErr)
return BCOrErr.getError();
Modified: llvm/trunk/lib/Object/SymbolicFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/SymbolicFile.cpp?rev=223822&r1=223821&r2=223822&view=diff
==============================================================================
--- llvm/trunk/lib/Object/SymbolicFile.cpp (original)
+++ llvm/trunk/lib/Object/SymbolicFile.cpp Tue Dec 9 14:36:13 2014
@@ -33,7 +33,7 @@ ErrorOr<std::unique_ptr<SymbolicFile>> S
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<std::unique_ptr<SymbolicFile>> S
if (!BCData)
return std::move(Obj);
- return IRObjectFile::createIRObjectFile(
+ return IRObjectFile::create(
MemoryBufferRef(BCData->getBuffer(), Object.getBufferIdentifier()),
*Context);
}
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=223822&r1=223821&r2=223822&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Dec 9 14:36:13 2014
@@ -303,7 +303,7 @@ static ld_plugin_status claim_file_hook(
}
ErrorOr<std::unique_ptr<object::IRObjectFile>> 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, c
MemoryBufferRef BufferRef(StringRef((const char *)View, File.filesize), "");
ErrorOr<std::unique_ptr<object::IRObjectFile>> 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",
More information about the llvm-commits
mailing list