[lld] r364567 - Fix lld build on Windows with MSVC due to C2461
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 10:19:28 PDT 2019
Author: hliao
Date: Thu Jun 27 10:19:28 2019
New Revision: 364567
URL: http://llvm.org/viewvc/llvm-project?rev=364567&view=rev
Log:
Fix lld build on Windows with MSVC due to C2461
- It seems the same name of class and one of its fields confuses MSVC,
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2461?view=vs-2019
- Patch from Andryeyev, German <german.andryeyev at amd.com>
Modified:
lld/trunk/COFF/SymbolTable.cpp
Modified: lld/trunk/COFF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=364567&r1=364566&r2=364567&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.cpp (original)
+++ lld/trunk/COFF/SymbolTable.cpp Thu Jun 27 10:19:28 2019
@@ -128,7 +128,7 @@ std::vector<std::string> getSymbolLocati
struct UndefinedDiag {
Symbol *Sym;
struct File {
- ObjFile *File;
+ ObjFile *OFile;
uint64_t SymIndex;
};
std::vector<File> Files;
@@ -143,7 +143,7 @@ static void reportUndefinedSymbol(const
size_t I = 0, NumRefs = 0;
for (const UndefinedDiag::File &Ref : UndefDiag.Files) {
std::vector<std::string> SymbolLocations =
- getSymbolLocations(Ref.File, Ref.SymIndex);
+ getSymbolLocations(Ref.OFile, Ref.SymIndex);
NumRefs += SymbolLocations.size();
for (const std::string &S : SymbolLocations) {
if (I >= MaxUndefReferences)
More information about the llvm-commits
mailing list