[WebAssembly] Fix parsing of linking section for named global imports
authorAndy Wingo <wingo@igalia.com>
Tue, 17 Nov 2020 16:03:50 +0000 (08:03 -0800)
committerSam Clegg <sbc@chromium.org>
Tue, 17 Nov 2020 16:14:29 +0000 (08:14 -0800)
Differential Revision: https://reviews.llvm.org/D91635

llvm/lib/Object/WasmObjectFile.cpp
llvm/test/MC/WebAssembly/debug-info.ll
llvm/test/MC/WebAssembly/debug-info64.ll

index 82aa1f5..d6bb96f 100644 (file)
@@ -562,7 +562,6 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadContext &Ctx) {
           Info.Name = Import.Field;
         }
         GlobalType = &Import.Global;
-        Info.ImportName = Import.Field;
         if (!Import.Module.empty()) {
           Info.ImportModule = Import.Module;
         }
index 0277daf..167d912 100644 (file)
 ; CHECK-NEXT:    Flags [ (0x10)
 ; CHECK-NEXT:      UNDEFINED (0x10)
 ; CHECK-NEXT:    ]
-; CHECK-NEXT:    ImportName: __stack_pointer
 ; CHECK-NEXT:    ImportModule: env
 ; CHECK-NEXT:    ElementIndex: 0x0
 ; CHECK-NEXT:  }
index 48f46ee..acba8aa 100644 (file)
 ; CHECK-NEXT:     Flags [ (0x10)
 ; CHECK-NEXT:       UNDEFINED (0x10)
 ; CHECK-NEXT:     ]
-; CHECK-NEXT:     ImportName: __stack_pointer
 ; CHECK-NEXT:     ImportModule: env
 ; CHECK-NEXT:     ElementIndex: 0x0
 ; CHECK-NEXT:   }