| Index: base/logging.h
|
| diff --git a/base/logging.h b/base/logging.h
|
| index 95cbfac7726027295fc84f57713c9fa3828e827f..5fa568135e269aa5c53b1800c29a15ba57bb6547 100644
|
| --- a/base/logging.h
|
| +++ b/base/logging.h
|
| @@ -513,6 +513,14 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
|
| #define NOTIMPLEMENTED_POLICY 4
|
| #endif
|
|
|
| +#if defined(COMPILER_GCC)
|
| +// On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name
|
| +// of the current function in the NOTIMPLEMENTED message.
|
| +#define NOTIMPLEMENTED_MSG "Not implemented reached in " << __PRETTY_FUNCTION__
|
| +#else
|
| +#define NOTIMPLEMENTED_MSG "NOT IMPLEMENTED"
|
| +#endif
|
| +
|
| #if NOTIMPLEMENTED_POLICY == 0
|
| #define NOTIMPLEMENTED() ;
|
| #elif NOTIMPLEMENTED_POLICY == 1
|
| @@ -523,11 +531,11 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
|
| #elif NOTIMPLEMENTED_POLICY == 3
|
| #define NOTIMPLEMENTED() NOTREACHED()
|
| #elif NOTIMPLEMENTED_POLICY == 4
|
| -#define NOTIMPLEMENTED() LOG(ERROR) << "NOT IMPLEMENTED!"
|
| +#define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG
|
| #elif NOTIMPLEMENTED_POLICY == 5
|
| #define NOTIMPLEMENTED() do {\
|
| static int count = 0;\
|
| - LOG_IF(ERROR, 0 == count++) << "NOT IMPLEMENTED!";\
|
| + LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\
|
| } while(0)
|
| #endif
|
|
|
|
|