[llvm] r284681 - Use __func__ directly now that all supported compilers support it
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 10:50:39 PDT 2016
Looks like I failed to dcommit in the right order, and Eric fixed it up
after the fact:
$ git diff
diff --git a/tools/libclang/CIndexHigh.cpp b/tools/libclang/CIndexHigh.cpp
index d2baa13..bec0e82 100644
--- a/tools/libclang/CIndexHigh.cpp
+++ b/tools/libclang/CIndexHigh.cpp
@@ -411,7 +411,7 @@ extern "C" {
CXResult clang_findReferencesInFile(CXCursor cursor, CXFile file,
CXCursorAndRangeVisitor visitor) {
- LogRef Log = Logger::make(LLVM_FUNCTION_NAME);
+ LogRef Log = Logger::make(__func__);
if (clang_Cursor_isNull(cursor)) {
if (Log)
@@ -485,7 +485,7 @@ CXResult clang_findIncludesInFile(CXTranslationUnit TU,
CXFile file,
return CXResult_Invalid;
}
- LogRef Log = Logger::make(LLVM_FUNCTION_NAME);
+ LogRef Log = Logger::make(__func__);
if (!file) {
if (Log)
*Log << "Null file";
diff --git a/tools/libclang/CLog.h b/tools/libclang/CLog.h
index b9309ed..e1d6a57 100644
--- a/tools/libclang/CLog.h
+++ b/tools/libclang/CLog.h
@@ -98,6 +98,6 @@ public:
/// \endcode
#define LOG_SECTION(NAME) \
if (clang::cxindex::LogRef Log = clang::cxindex::Logger::make(NAME))
-#define LOG_FUNC_SECTION LOG_SECTION(LLVM_FUNCTION_NAME)
+#define LOG_FUNC_SECTION LOG_SECTION(__func__)
#endif
diff --git a/tools/libclang/CXSourceLocation.cpp
b/tools/libclang/CXSourceLocation.cpp
index e75f6a7..68ecf38 100644
--- a/tools/libclang/CXSourceLocation.cpp
+++ b/tools/libclang/CXSourceLocation.cpp
@@ -131,7 +131,7 @@ CXSourceLocation clang_getLocation(CXTranslationUnit TU,
if (line == 0 || column == 0)
return clang_getNullLocation();
- LogRef Log = Logger::make(LLVM_FUNCTION_NAME);
+ LogRef Log = Logger::make(__func__);
ASTUnit *CXXUnit = cxtu::getASTUnit(TU);
ASTUnit::ConcurrencyCheck Check(*CXXUnit);
const FileEntry *File = static_cast<const FileEntry *>(file);
rnk at rnk4-w MINGW64 /c/src/llvm/tools/clang (master)
$ git commit -a -m 'Use __func__ instead of LLVM_FUNCTION_NAME now that all
supported compilers support it'
[master 99252cd] Use __func__ instead of LLVM_FUNCTION_NAME now that all
supported compilers support it
(no dcommit)
On Wed, Oct 19, 2016 at 6:25 PM, Dehao Chen <dehao at google.com> wrote:
> Looks like this needs to update tools/clang too?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/70f43c10/attachment.html>
More information about the llvm-commits
mailing list