Rename createIRObjectFile to just create.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 9 Dec 2014 20:36:13 +0000 (20:36 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 9 Dec 2014 20:36:13 +0000 (20:36 +0000)
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
lib/Object/IRObjectFile.cpp
lib/Object/SymbolicFile.cpp
tools/gold/gold-plugin.cpp

index 3a6edd0ab7c5a62387cc5686662d1b53d12c0215..74f46667ce64a3f3c451590931709b8d95084cda 100644 (file)
@@ -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);
 };
 }
 }
index 185b783e3501cb2d1150d9b364268db2c3d4c32d..d9e461050edd67eb5fb377e5d68ae3f553bf85c5 100644 (file)
@@ -290,8 +290,8 @@ ErrorOr<MemoryBufferRef> IRObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Ob
 }
 
 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();
index ffd3dbcdb0def0cebf5b3a1f53545ecc85574d0e..de98a1228cd4a1c82573ab98727f3ab0916e8b26 100644 (file)
@@ -33,7 +33,7 @@ ErrorOr<std::unique_ptr<SymbolicFile>> 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<std::unique_ptr<SymbolicFile>> SymbolicFile::createSymbolicFile(
     if (!BCData)
       return std::move(Obj);
 
-    return IRObjectFile::createIRObjectFile(
+    return IRObjectFile::create(
         MemoryBufferRef(BCData->getBuffer(), Object.getBufferIdentifier()),
         *Context);
   }
index 2cb181eca385d2105f27c6a5fd5ed01911ca11f1..2528362473525a8ce2e936139bdc0e36685f7315 100644 (file)
@@ -303,7 +303,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
   }
 
   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, claimed_file &F, raw_fd_ostream *ApiFile,
 
   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",