[lld] r286282 - Rename a function to avoid function overloading. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 12:02:24 PST 2016


Author: ruiu
Date: Tue Nov  8 14:02:23 2016
New Revision: 286282

URL: http://llvm.org/viewvc/llvm-project?rev=286282&view=rev
Log:
Rename a function to avoid function overloading. NFC.

Modified:
    lld/trunk/ELF/SymbolTable.cpp

Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=286282&r1=286281&r2=286282&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Tue Nov  8 14:02:23 2016
@@ -365,7 +365,7 @@ Symbol *SymbolTable<ELFT>::addCommon(Str
   return S;
 }
 
-static void reportDuplicate(const std::string &Msg) {
+static void print(const Twine &Msg) {
   if (Config->AllowMultipleDefinition)
     warn(Msg);
   else
@@ -373,7 +373,7 @@ static void reportDuplicate(const std::s
 }
 
 static void reportDuplicate(SymbolBody *Existing, InputFile *NewFile) {
-  reportDuplicate("duplicate symbol " + conflictMsg(Existing, NewFile));
+  print("duplicate symbol " + conflictMsg(Existing, NewFile));
 }
 
 template <class ELFT>
@@ -389,9 +389,9 @@ static void reportDuplicate(SymbolBody *
   std::string OldLoc = getLocation(Existing, *D->Section, D->Value);
   std::string NewLoc = getLocation(nullptr, *ErrSec, ErrOffset);
 
-  reportDuplicate(NewLoc + ": duplicate symbol '" +
-                  maybeDemangle(Existing->getName()) + "'");
-  reportDuplicate(OldLoc + ": previous definition was here");
+  print(NewLoc + ": duplicate symbol '" + maybeDemangle(Existing->getName()) +
+        "'");
+  print(OldLoc + ": previous definition was here");
 }
 
 template <typename ELFT>




More information about the llvm-commits mailing list