[PATCH] D119381: [MTE] Add NT_ANDROID_TYPE_MEMTAG

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 00:23:51 PST 2022


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/AArch64/memtag/aarch64-note-android-memtag.test:80
+        Type: NT_ANDROID_TYPE_MEMTAG
+        [[DESC]]
----------------
hctim wrote:
> jhenderson wrote:
> > You should be able to do this and then omit "Desc: " from the -D values in the yaml2obj runs.
> `yaml2obj` complained about `Desc: \n` when testing for `INVALID` (i.e. we don't want any description bytes), so I materialized the entire line as a `-D` parameter instead :).
> `yaml2obj` complained about `Desc: \n` when testing for `INVALID` (i.e. we don't want any description bytes), so I materialized the entire line as a `-D` parameter instead :).




================
Comment at: llvm/test/tools/llvm-readobj/ELF/AArch64/note-android-memtag.test:80
+        Type: NT_ANDROID_TYPE_MEMTAG
+        [[DESC]]
----------------
> `yaml2obj` complained about `Desc: \n` when testing for `INVALID` (i.e. we don't want any description bytes), so I materialized the entire line as a `-D` parameter instead :).
Ah, I missed that you omitted `Desc` entirely in the last case. For that case, you just need to provide empty quotes, I believe. The final YAML would look like `Desc: ''`. Of course, this means you'll need to do something about escaping the quotes on the lit commandline. An alternative approach is using the "<none>" approach, although I don't know if that works for the `Desc` field. See llvm/test/tools/yaml2obj/ELF/none-value.yaml for example usage: essentially, "<none>" set as the default value (i.e. `[[DESC=<none>]]`) means that the field is treated as not specified if a macro value is not provided on the command-line.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119381/new/

https://reviews.llvm.org/D119381



More information about the llvm-commits mailing list