jhenderson added inline comments.
================ Comment at: llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml:189 +# RUN: sed -e 's/<BITS>/64/' -e 's/<MACH>/AMDGCN_GFX1035/' %s | yaml2obj -o %t.o.AMDGCN_GFX1035 +# RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1035 | FileCheck --check-prefixes=ELF-AMDGCN-ALL,ELF-AMDGCN-GFX1035 %s ---------------- MaskRay wrote: > sed can be replaced by `FileCheck -D` (search examples in `test/tools/`). > > The long list becomes unwieldy now. @jhenderson Suggestions on decreasing the > number of RUN lines? > sed can be replaced by `FileCheck -D` (search examples in `test/tools/`). Is that true in this context? The `sed` command is controlling input to yaml2obj, not some FileCheck stuff. > The long list becomes unwieldy now. @jhenderson Suggestions on decreasing the > number of RUN lines? I think you could use additional -D options for FileCheck. Something like the following: ``` # RUN: llvm-readobj ... | FileCheck --check-prefixes=ELF-ALL,ELF-AMDGCN -DNAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 -DVAL=0x3D # RUN: obj2yaml ... | FileCheck %s --check-prefixes=YAML-ALL,YAML-AMDGCN -DFLAG=EF_AMDGPU_MACH_AMDGCN_GFX1035 ## Repeat for all the other values. ## NB: Some of these might be better with the -NEXT suffix. # ELF-R600: Format: elf32-amdgpu # ELF-R600: Arch: r600 # ELF-R600: AddressSize: 32bit # ELF-AMDGCN: Format: elf64-amdgpu # ELF-AMDGCN: Arch: amdgcn # ELF-AMDGCN: AddressSize: 64bit # ELF-ALL: Flags [ # ELF-ALL-NEXT: [[NAME]] ([[VAL]]) # ELF-ALL-NEXT: ] # YAML-R600: Class: ELFCLASS32 # YAML-AMDGCN: Class: ELFCLASS64 # YAML-ALL: Flags: [ [[FLAG]] ] ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104804/new/ https://reviews.llvm.org/D104804 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits