From c8ac0a6f979c36ad7f7c3e1b9b2e8260f483aa15 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 20 Apr 2018 22:50:15 +0000 Subject: [PATCH] [ELF] Swap argument names: use Old to refer to original symbol and New for incoming one Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D45905 llvm-svn: 330491 --- lld/ELF/SymbolTable.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 041aeb6..49aa908 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -339,9 +339,9 @@ static uint8_t getVisibility(uint8_t StOther) { return StOther & 3; } // 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 @@ -376,7 +376,7 @@ Symbol *SymbolTable::addUndefined(StringRef Name, uint8_t Binding, return S; } - checkBackrefs(Name, File, S->File); + checkBackrefs(Name, S->File, File); fetchLazy(S); } return S; -- 2.7.4