[llvm] [GOFF] Refactor writing GOFF records (PR #93855)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 01:05:51 PDT 2024


================
@@ -0,0 +1,74 @@
+# RUN: awk 'BEGIN {str = sprintf("%47s", "")} {gsub("@FILL@", str); print}' < %s | \
----------------
jh7370 wrote:

I'm not sure how portable this `awk` line is, but in any case, I don't think it's needed, if all you're trying to do is to set a specific string for different cases. You can use yaml2obj's -D option to specify a specific value that replaces `[[VARNAME]]` in the fields. The variable can even have a default value. Finally, with a bit of additional work in yaml2obj, you can specify something like `[[VARNAME=<none>]]` and yaml2obj will treat the field as not being present at all (see ELF for some examples of all of the above).

https://github.com/llvm/llvm-project/pull/93855


More information about the llvm-commits mailing list