[PATCH] D46417: wasm: Add a flag to control merging data segments

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 7 14:05:57 PDT 2018


sbc100 added a comment.

Change itself good now.

I think we can simplify/improve the new tests though.



================
Comment at: test/wasm/merge-data-segments.test:4
+# RUN: wasm-ld --allow-undefined -o %t.wasm %t.data-segments-a.o %t.data-segments-b.o
+# RUN: obj2yaml %t.wasm | FileCheck %s
+
----------------
You can do the no merge case in the same file with something like this:

```
# wasm-ld --allow-undefined --no-merge-data-segments -o %t.nomerge.wasm %t.data-segments-a.o %t.data-segments-b.o
​# RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=NO-MERGE
```

Also I think we can avoid adding new input file, and just put the bitcode here in the test file.  You'll need to rename this to a ".ll" file and use ";" for comments.

Also, you can make the bitcode itself minimal?  Just declaring the data should be enough no need to for any code I think.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46417





More information about the llvm-commits mailing list