[Clang][PP] Add the __FILE_NAME__ builtin macro.

Authored by kristina on May 15 2019, 5:52 PM.

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.


[Clang][PP] Add the FILE_NAME builtin macro.

This patch adds the __FILE_NAME__ macro that expands to the
last component of the path, similar to __FILE__ except with
a guarantee that only the last path component (without the
separator) will be rendered.

I intend to follow through with discussion of this with WG14
as a potential inclusion in the C standard or failing that,
try to discuss this with GCC developers since this extension
is desired by GCC and Clang users/developers alike.

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

llvm-svn: 360833


sidorovdMay 24 2019, 5:39 AM
Differential Revision
D61756: Add a __FILE_NAME__ macro.

Commit No Longer Exists

This commit no longer exists in the repository.