summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-01-18 11:15:50 +0000
committerPavel Labath <labath@google.com>2018-01-18 11:15:50 +0000
commit8872d703ad64fb2c01ed6124f181662562c037b8 (patch)
tree453e4eee512539ba7958772f5ec69cfb8b4f57ed
parent26370ddcd7327a430543f57281978a4d974e456d (diff)
downloadbcm5719-llvm-8872d703ad64fb2c01ed6124f181662562c037b8.tar.gz
bcm5719-llvm-8872d703ad64fb2c01ed6124f181662562c037b8.zip
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. llvm-svn: 322834
-rw-r--r--lldb/include/lldb/Utility/Log.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/include/lldb/Utility/Log.h b/lldb/include/lldb/Utility/Log.h
index 80a80fc1648..81028381b0e 100644
--- a/lldb/include/lldb/Utility/Log.h
+++ b/lldb/include/lldb/Utility/Log.h
@@ -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
OpenPOWER on IntegriCloud