[PATCH] D45905: [ELF] Swap argument names: use Old to refer to original symbol and New for incoming one

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 15:54:43 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL330491: [ELF] Swap argument names: use Old to refer to original symbol and New for… (authored by MaskRay, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D45905

Files:
  lld/trunk/ELF/SymbolTable.cpp


Index: lld/trunk/ELF/SymbolTable.cpp
===================================================================
--- lld/trunk/ELF/SymbolTable.cpp
+++ lld/trunk/ELF/SymbolTable.cpp
@@ -339,9 +339,9 @@
 // files) form group 2. E forms group 3. I think that you can see how this
 // group assignment rule simulates the traditional linker's semantics.
 static void checkBackrefs(StringRef Name, InputFile *Old, InputFile *New) {
-  if (Config->WarnBackrefs && Old && New->GroupId < Old->GroupId)
-    warn("backward reference detected: " + Name + " in " + toString(Old) +
-         " refers to " + toString(New));
+  if (Config->WarnBackrefs && New && Old->GroupId < New->GroupId)
+    warn("backward reference detected: " + Name + " in " + toString(New) +
+         " refers to " + toString(Old));
 }
 
 template <class ELFT>
@@ -376,7 +376,7 @@
       return S;
     }
 
-    checkBackrefs(Name, File, S->File);
+    checkBackrefs(Name, S->File, File);
     fetchLazy<ELFT>(S);
   }
   return S;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45905.143404.patch
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180420/c6cb60a9/attachment.bin>


More information about the llvm-commits mailing list