forked from OSchip/llvm-project
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
This commit is contained in:
parent
32ef9292be
commit
a166b903d0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue