From: Erik Pilkington Date: Thu, 20 Oct 2016 02:46:22 +0000 (+0000) Subject: Replace uses of LLVM_FUNCTION_NAME with __func__, this was macro was removed from... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d7fceb69020c5d6d9dda4b52cde9b4ece620431;p=clang Replace uses of LLVM_FUNCTION_NAME with __func__, this was macro was removed from llvm/Support in r284681 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284690 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/CIndexHigh.cpp b/tools/libclang/CIndexHigh.cpp index d2baa13be9..bec0e824dd 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 b9309ed192..e1d6a57e4a 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 e75f6a757f..68ecf388bd 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(file);