[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

Weiming Zhao via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 3 00:21:47 PST 2016


weimingz updated this revision to Diff 49713.
weimingz added a comment.

Add "-f__FILE__-prefix-to-remove" flag to support the trim of the prefix.
Passing special value __ALL_DIR__  to remove all dir parts.

For example FILE is /a/b/c
-f__FILE__-prefix-to-remove=/a/ will cause FILE be expanded to b/c


http://reviews.llvm.org/D17741

Files:
  include/clang/Driver/Options.td
  include/clang/Lex/Preprocessor.h
  include/clang/Lex/PreprocessorOptions.h
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Lex/PPMacroExpansion.cpp
  test/Lexer/file_basename.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17741.49713.patch
Type: text/x-patch
Size: 9580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160303/073726c2/attachment.bin>


More information about the cfe-commits mailing list