This revision was automatically updated to reflect the committed changes. Closed by commit rL314929: LLDB cmake fix: define LLDB_CONFIGURATION_xxx based on the build type (authored by lemo).
Changed prior to commit: https://reviews.llvm.org/D38552?vs=117704&id=117730#toc Repository: rL LLVM https://reviews.llvm.org/D38552 Files: lldb/trunk/CMakeLists.txt lldb/trunk/include/lldb/Utility/SharingPtr.h Index: lldb/trunk/include/lldb/Utility/SharingPtr.h =================================================================== --- lldb/trunk/include/lldb/Utility/SharingPtr.h +++ lldb/trunk/include/lldb/Utility/SharingPtr.h @@ -529,16 +529,7 @@ ~IntrusiveSharingPtr() { release_shared(); -#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE) - // NULL out the pointer in objects which can help with leaks detection. - // We don't enable this for LLDB_CONFIGURATION_BUILD_AND_INTEGRATION or - // when none of the LLDB_CONFIGURATION_XXX macros are defined since - // those would be builds for release. But for debug and release builds - // that are for development, we NULL out the pointers to catch potential - // issues. ptr_ = nullptr; -#endif // #if defined (LLDB_CONFIGURATION_DEBUG) || defined - // (LLDB_CONFIGURATION_RELEASE) } T &operator*() const { return *ptr_; } Index: lldb/trunk/CMakeLists.txt =================================================================== --- lldb/trunk/CMakeLists.txt +++ lldb/trunk/CMakeLists.txt @@ -11,6 +11,13 @@ include(LLDBConfig) include(AddLLDB) +# Define the LLDB_CONFIGURATION_xxx matching the build type +if( uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) + add_definitions( -DLLDB_CONFIGURATION_DEBUG ) +else() + add_definitions( -DLLDB_CONFIGURATION_RELEASE ) +endif() + if (CMAKE_SYSTEM_NAME MATCHES "Windows|Android") set(LLDB_DEFAULT_DISABLE_LIBEDIT 1) else()
Index: lldb/trunk/include/lldb/Utility/SharingPtr.h =================================================================== --- lldb/trunk/include/lldb/Utility/SharingPtr.h +++ lldb/trunk/include/lldb/Utility/SharingPtr.h @@ -529,16 +529,7 @@ ~IntrusiveSharingPtr() { release_shared(); -#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE) - // NULL out the pointer in objects which can help with leaks detection. - // We don't enable this for LLDB_CONFIGURATION_BUILD_AND_INTEGRATION or - // when none of the LLDB_CONFIGURATION_XXX macros are defined since - // those would be builds for release. But for debug and release builds - // that are for development, we NULL out the pointers to catch potential - // issues. ptr_ = nullptr; -#endif // #if defined (LLDB_CONFIGURATION_DEBUG) || defined - // (LLDB_CONFIGURATION_RELEASE) } T &operator*() const { return *ptr_; } Index: lldb/trunk/CMakeLists.txt =================================================================== --- lldb/trunk/CMakeLists.txt +++ lldb/trunk/CMakeLists.txt @@ -11,6 +11,13 @@ include(LLDBConfig) include(AddLLDB) +# Define the LLDB_CONFIGURATION_xxx matching the build type +if( uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) + add_definitions( -DLLDB_CONFIGURATION_DEBUG ) +else() + add_definitions( -DLLDB_CONFIGURATION_RELEASE ) +endif() + if (CMAKE_SYSTEM_NAME MATCHES "Windows|Android") set(LLDB_DEFAULT_DISABLE_LIBEDIT 1) else()
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits