Author: labath Date: Thu Jan 18 03:15:50 2018 New Revision: 322834 URL: http://llvm.org/viewvc/llvm-project?rev=322834&view=rev Log: Fix logging test on windows
Refactor in r322653 broke the logging test on windows because MSVC uses a fully qualified name as the value of __FUNCTION__, which is not what we were expecting. I'm changing the code to use the more portable __func__, which behaves the same as on clang/gcc. The standard still says that the value of __func__ is implementation defined, so if we run into problems with this test again we may just need to drop it. Modified: lldb/trunk/include/lldb/Utility/Log.h Modified: lldb/trunk/include/lldb/Utility/Log.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Log.h?rev=322834&r1=322833&r2=322834&view=diff ============================================================================== --- lldb/trunk/include/lldb/Utility/Log.h (original) +++ lldb/trunk/include/lldb/Utility/Log.h Thu Jan 18 03:15:50 2018 @@ -208,14 +208,14 @@ private: do { \ ::lldb_private::Log *log_private = (log); \ if (log_private) \ - log_private->Format(__FILE__, __FUNCTION__, __VA_ARGS__); \ + log_private->Format(__FILE__, __func__, __VA_ARGS__); \ } while (0) #define LLDB_LOGV(log, ...) \ do { \ ::lldb_private::Log *log_private = (log); \ if (log_private && log_private->GetVerbose()) \ - log_private->Format(__FILE__, __FUNCTION__, __VA_ARGS__); \ + log_private->Format(__FILE__, __func__, __VA_ARGS__); \ } while (0) #endif // LLDB_UTILITY_LOG_H _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits