-
Notifications
You must be signed in to change notification settings - Fork 828
Update names field in source maps #8068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
3c636de
484554c
f636186
38d6742
3a68a12
93d135a
a55a844
6a53061
d0a70ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ;; RUN: wasm-opt %s --remove-unused-module-elements -o %t.wasm -osm %t.map | ||
| ;; RUN: wasm-dis %t.wasm --source-map %t.map | filecheck %s --check-prefix OUT-WAST | ||
| ;; RUN: cat %t.map | filecheck %s --check-prefix OUT-MAP | ||
|
|
||
| ;; After --remove-unused-module-elements, the output source map's 'names' field | ||
| ;; should NOT contain 'unused' | ||
|
|
||
| ;; OUT-MAP: "names":["used","used2"] | ||
|
|
||
| (module | ||
| (export "used" (func $used)) | ||
| (export "used2" (func $used2)) | ||
|
|
||
| (func $unused | ||
| ;;@ src.cpp:1:1:unused | ||
| (nop) | ||
| ) | ||
|
|
||
| (func $used | ||
| ;; OUT-WAST: ;;@ src.cpp:2:1:used | ||
| ;; OUT-WAST-NEXT: (nop) | ||
| ;;@ src.cpp:2:1:used | ||
| (nop) | ||
| ) | ||
|
|
||
| (func $used2 | ||
| ;; OUT-WAST: ;;@ src.cpp:3:1:used | ||
| ;; OUT-WAST-NEXT: (nop) | ||
| ;;@ src.cpp:3:1:used2 | ||
| (nop) | ||
| ) | ||
| ) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps add another used symbol, to get some coverage of the order of the symbols being deterministic? (not great coverage, but it might help)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done: a55a844 |
||
Uh oh!
There was an error while loading. Please reload this page.