[PATCH] D44331: [WebAssembly] Add test for imported ctor and fix indexing bug found

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 10 08:21:32 PST 2018


ncw added inline comments.


================
Comment at: wasm/Writer.cpp:664
     else
-      ++NumImportedGlobals;
+      Sym->setOutputIndex(NumImportedGlobals++);
   }
----------------
sbc100 wrote:
> Do the tests now check for this?  (i.e. if you revert this part of the change will the test fail?)
> 
> Maybe be worth splitting this off as a separate bug fix?
Yes, the test change that's attached exercises the case where some globals and functions are interleaved in the import section.

The attached test change fails without this fix, hence bundling them together. Happy to land in two commits though - whatever you prefer.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44331





More information about the llvm-commits mailing list