[all-commits] [llvm/llvm-project] 07e6eb: [yaml2obj] Add a `-E` flag to preprocess only.

Simon Tatham via All-commits all-commits at lists.llvm.org
Tue Aug 2 05:58:37 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07e6eb6e75b8ab65cd54346790dd53862c7d5847
  Author: Simon Tatham <simon.tatham at arm.com>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    A llvm/test/tools/yaml2obj/preprocess-only.test
    M llvm/tools/yaml2obj/yaml2obj.cpp

  Log Message:
  [yaml2obj] Add a `-E` flag to preprocess only.

If you're having trouble getting a yaml2obj macro expansion to do what
you want, it's useful to be able to print the output of the
preprocessing to see what your macros expanded to //before// going
into the YAML processing phase.

yaml2obj has its own preprocessing system which isn't the same as any
other well-known thing like cpp. So there's no way to do this macro
expansion via another tool: yaml2obj will have to do it itself.

In this commit I add an `-E` flag to yaml2obj to do that.

Differential Revision: https://reviews.llvm.org/D130981

More information about the All-commits mailing list