Skip to content

Commit

Permalink
Add a new portability macro LLVM_FUNCTION_NAME, that expands to __fun…
Browse files Browse the repository at this point in the history
…c__, if

supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172156 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gribozavr committed Jan 11, 2013
1 parent cbdb7e4 commit caa91f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/llvm/Support/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,13 @@
# define LLVM_ASSUME_ALIGNED(p, a) (p)
#endif

/// \macro LLVM_FUNCTION_NAME
/// \brief Expands to __func__ on compilers which support it. Otherwise,
/// expands to a compiler-dependent replacement.
#if defined(_MSC_VER)
# define LLVM_FUNCTION_NAME __FUNCTION__
#else
# define LLVM_FUNCTION_NAME __func__
#endif

#endif

0 comments on commit caa91f8

Please sign in to comment.