diff options
author | Michael Liao <michael.hliao@gmail.com> | 2019-06-27 17:19:28 +0000 |
---|---|---|
committer | Michael Liao <michael.hliao@gmail.com> | 2019-06-27 17:19:28 +0000 |
commit | a166b903d0ee8fca30c494ff4fb8687c310a0628 (patch) | |
tree | c60b27c6a65e8115671c3b70c209880ffb9c4b2e | |
parent | 32ef9292bea1731237364c566172b4be94274d07 (diff) | |
download | bcm5719-llvm-a166b903d0ee8fca30c494ff4fb8687c310a0628.tar.gz bcm5719-llvm-a166b903d0ee8fca30c494ff4fb8687c310a0628.zip |
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@amd.com>
llvm-svn: 364567
-rw-r--r-- | lld/COFF/SymbolTable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp index 529562d807d..cbdce10b68c 100644 --- a/lld/COFF/SymbolTable.cpp +++ b/lld/COFF/SymbolTable.cpp @@ -128,7 +128,7 @@ std::vector<std::string> getSymbolLocations(ObjFile *File, uint32_t SymIndex) { 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 UndefinedDiag &UndefDiag) { 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) |