[llvm] [Object][Wasm] Use offset instead of index for Global address and store size (PR #81781)
    Derek Schuff via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Feb 14 15:23:44 PST 2024
    
    
  
================
@@ -1936,6 +1942,8 @@ uint32_t WasmObjectFile::getSymbolSize(SymbolRef Symb) const {
   const WasmSymbol &Sym = getWasmSymbol(Symb);
   if (!Sym.isDefined())
     return 0;
+  if (Sym.isTypeGlobal())
+    return globals()[Sym.Info.ElementIndex - getNumImportedGlobals()].Size;
----------------
dschuff wrote:
Yes, done.
https://github.com/llvm/llvm-project/pull/81781
    
    
More information about the llvm-commits
mailing list