projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbdb7e4
)
Add a new portability macro LLVM_FUNCTION_NAME, that expands to __func__, if
author
Dmitri Gribenko
<gribozavr@gmail.com>
Fri, 11 Jan 2013 01:13:51 +0000
(
01:13
+0000)
committer
Dmitri Gribenko
<gribozavr@gmail.com>
Fri, 11 Jan 2013 01:13:51 +0000
(
01:13
+0000)
supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172156
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Compiler.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Compiler.h
b/include/llvm/Support/Compiler.h
index b32939eac02a3d8cee11c452d7917820b2010575..e639a2cfa1e798f2f4ef1ce761324bae58ef4197 100644
(file)
--- a/
include/llvm/Support/Compiler.h
+++ b/
include/llvm/Support/Compiler.h
@@
-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