[PATCH] D145397: [Lex] Use line markers in preprocessed assembly predefines file

John Brawn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 6 09:10:21 PST 2023


john.brawn created this revision.
john.brawn added reviewers: aaron.ballman, rsmith, jansvoboda11, rjmccall.
Herald added a project: All.
john.brawn requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

GNU line marker directives are not recognised when preprocessing assembly files, meaning they can't be used in the predefines file meaning macros defined on the command line are reported as being built-in.

Change this to permit line markers but only in the predefines file, so we can correctly report command line macros as coming from the command line.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145397

Files:
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/lib/Lex/PPDirectives.cpp
  clang/test/Preprocessor/directives_asm.S
  clang/test/Preprocessor/macro_redefined.S

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145397.502680.patch
Type: text/x-patch
Size: 4143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230306/0aada121/attachment-0001.bin>


More information about the cfe-commits mailing list