[llvm-branch-commits] [llvm-branch] r134381 - /llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp

Chris Lattner sabre at nondot.org
Mon Jul 4 13:20:28 PDT 2011


Author: lattner
Date: Mon Jul  4 15:20:28 2011
New Revision: 134381

URL: http://llvm.org/viewvc/llvm-project?rev=134381&view=rev
Log:
convert an std::string to StringRef.

Modified:
    llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp

Modified: llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp?rev=134381&r1=134380&r2=134381&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp (original)
+++ llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp Mon Jul  4 15:20:28 2011
@@ -149,7 +149,7 @@
 /// ForceRenaming - The LLVM SymbolTable class autorenames globals that conflict
 /// in the symbol table.  This is good for all clients except for us.  Go
 /// through the trouble to force this back.
-static void ForceRenaming(GlobalValue *GV, const std::string &Name) {
+static void ForceRenaming(GlobalValue *GV, StringRef Name) {
   assert(GV->getName() != Name && "Can't force rename to self");
   ValueSymbolTable &ST = GV->getParent()->getValueSymbolTable();
 
@@ -663,8 +663,7 @@
 
     // If the symbol table renamed the alias, but it is an externally visible
     // symbol, DGA must be an global value with internal linkage. Rename it.
-    if (NewGA->getName() != SGA->getName() &&
-        !NewGA->hasLocalLinkage())
+    if (NewGA->getName() != SGA->getName() && !NewGA->hasLocalLinkage())
       ForceRenaming(NewGA, SGA->getName());
 
     // Remember this mapping so uses in the source module get remapped





More information about the llvm-branch-commits mailing list