diff options
author | Jérôme Vouillon <jerome.vouillon@gmail.com> | 2024-05-15 15:32:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-15 12:32:08 -0700 |
commit | b70d8dff27ccea2d4546909dba83bf8cae072aba (patch) | |
tree | a76b4ead18f3cae141775870cb8b6018918e5df0 /test/lit | |
parent | 6b43a5ef76149c92e216fddb0a1ee17f736b4b6e (diff) | |
download | binaryen-b70d8dff27ccea2d4546909dba83bf8cae072aba.tar.gz binaryen-b70d8dff27ccea2d4546909dba83bf8cae072aba.tar.bz2 binaryen-b70d8dff27ccea2d4546909dba83bf8cae072aba.zip |
Debug location parser: accept arbitrary paths (#6594)
The whole annotation was parsed as a keyword, which prevented file paths with non-ascii characters or paths starting with `/` or `.`.
Also, there was a typo: one was comparing `fileSize` rather than `lineSize` to `contents->npos`.
Diffstat (limited to 'test/lit')
-rw-r--r-- | test/lit/source-map.wast | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/test/lit/source-map.wast b/test/lit/source-map.wast index c00374d67..f8ef07c65 100644 --- a/test/lit/source-map.wast +++ b/test/lit/source-map.wast @@ -10,9 +10,9 @@ (module ;;@ src.cpp:0:1 - ;; CHECK: (type $0 (func (param i32 i32))) + ;; CHECK: (type $0 (func)) - ;; CHECK: (type $1 (func)) + ;; CHECK: (type $1 (func (param i32 i32))) ;; CHECK: (func $foo (param $x i32) (param $y i32) ;; CHECK-NEXT: ;;@ src.cpp:10:1 @@ -88,4 +88,26 @@ ;;@ src.cpp:3:1 (return) ) + + ;; CHECK: (func $paths + ;; CHECK-NEXT: ;;@ /tmp/src.cpp:1:1 + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ;;@ ../src.cpp:2:2 + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ;;@ café.cpp:2:2 + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ;;@ café.cpp:2:2 + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ) + (func $paths + ;;@ /tmp/src.cpp:1:1 + (nop) + ;;@ ../src.cpp:2:2 + (nop) + ;;@ café.cpp:2:2 + (nop) + ;; This annotation is invalid (missing column) + ;;@ src.cpp:3 + (nop) + ) ) |