[PATCH] D67260: [yaml2obj] Set p_align to the maximum sh_addralign of containing sections

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 08:39:10 PDT 2019


jhenderson added inline comments.


================
Comment at: test/tools/yaml2obj/program-header-align.yaml:2
+## Test the p_align field of a program header can be set explicitly or inferred
+## from the maximum alignment of containing sections.
 
----------------
alignment of containing sections -> alignment of contained sections


================
Comment at: test/tools/yaml2obj/program-header-align.yaml:7
+# RUN: yaml2obj --docnum=1 %s -o %t
+# RUN: llvm-readobj -l %t | FileCheck --check-prefix=ALIGN-16 %s
+# ALIGN-16:      ProgramHeader {
----------------
I think you can just get rid of --check-prefix and use CHECK everywhere, right?


================
Comment at: test/tools/yaml2obj/program-header-align.yaml:8
+# RUN: llvm-readobj -l %t | FileCheck --check-prefix=ALIGN-16 %s
+# ALIGN-16:      ProgramHeader {
+# ALIGN-16:        Alignment: 16
----------------
Not sure if this is really needed since the yaml2obj below only has one ProgramHeader, but maybe worth considering adding `# CHECK-NOT: ProgramHeader` after this line, to make sure the Alignment is for the right program header.


================
Comment at: test/tools/yaml2obj/program-header-align.yaml:33
+## If Align is not specified, p_align is inferred from the maximum alignment
+## of containing sections.
+
----------------
containing -> contained


================
Comment at: test/tools/yaml2obj/program-header-align.yaml:36
+# RUN: yaml2obj --docnum=2 %s -o %t
+# RUN: llvm-readobj -l %t | FileCheck --check-prefix=ALIGN-16 %s
+
----------------
Delete --check-prefix?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67260





More information about the llvm-commits mailing list