[PATCH] D82455: [yaml2obj] - Add a way to set default values for macros used in a YAML.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 12:28:33 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/test/tools/yaml2obj/macro.yaml:68
+
+--- !ELF
+FileHeader:
----------------
The two YAML !ELF documents can be merged to make the file simpler.
================
Comment at: llvm/tools/yaml2obj/yaml2obj.cpp:84
+ // When the -D option is requested, we use a value provided.
+ // Otherwise we use a default macro value if any is present
+ // in the YAML description.
----------------
a default macro value if present.
"YAML description" is implied from the context.
================
Comment at: llvm/tools/yaml2obj/yaml2obj.cpp:91
+ else if (!Default.empty() ||
+ (Default.empty() && MacroExpr.endswith("=")))
+ Value = Default;
----------------
`!Default.empty() || MacroExpr.endswith("=")`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82455/new/
https://reviews.llvm.org/D82455
More information about the llvm-commits
mailing list