[llvm] r241692 - Inline function into only use.

Rafael Espindola rafael.espindola at gmail.com
Wed Jul 8 10:26:24 PDT 2015


Author: rafael
Date: Wed Jul  8 12:26:24 2015
New Revision: 241692

URL: http://llvm.org/viewvc/llvm-project?rev=241692&view=rev
Log:
Inline function into only use.

Modified:
    llvm/trunk/lib/Object/ArchiveWriter.cpp

Modified: llvm/trunk/lib/Object/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ArchiveWriter.cpp?rev=241692&r1=241691&r2=241692&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Object/ArchiveWriter.cpp Wed Jul  8 12:26:24 2015
@@ -116,24 +116,18 @@ static void printMemberHeader(raw_fd_ost
   printRestOfMemberHeader(Out, ModTime, UID, GID, Perms, Size);
 }
 
-static void printMemberHeader(raw_fd_ostream &Out, unsigned NameOffset,
-                              const sys::TimeValue &ModTime, unsigned UID,
-                              unsigned GID, unsigned Perms, unsigned Size) {
-  Out << '/';
-  printWithSpacePadding(Out, NameOffset, 15);
-  printRestOfMemberHeader(Out, ModTime, UID, GID, Perms, Size);
-}
-
 static void
 printMemberHeader(raw_fd_ostream &Out, StringRef Name,
                   std::vector<unsigned>::iterator &StringMapIndexIter,
                   const sys::TimeValue &ModTime, unsigned UID, unsigned GID,
                   unsigned Perms, unsigned Size) {
-  if (Name.size() < 16)
+  if (Name.size() < 16) {
     printMemberHeader(Out, Name, ModTime, UID, GID, Perms, Size);
-  else
-    printMemberHeader(Out, *StringMapIndexIter++, ModTime, UID, GID, Perms,
-                      Size);
+    return;
+  }
+  Out << '/';
+  printWithSpacePadding(Out, *StringMapIndexIter++, 15);
+  printRestOfMemberHeader(Out, ModTime, UID, GID, Perms, Size);
 }
 
 static void writeStringTable(raw_fd_ostream &Out,





More information about the llvm-commits mailing list