[Libreoffice-commits] core.git: 2 commits - config_host.mk.in configure.ac solenv/gbuild sw/source
Michael Stahl
mstahl at redhat.com
Mon Apr 10 11:47:19 UTC 2017
config_host.mk.in | 1 -
configure.ac | 18 ------------------
solenv/gbuild/platform/com_GCC_defs.mk | 4 +---
sw/source/core/edit/edlingu.cxx | 13 ++++---------
4 files changed, 5 insertions(+), 31 deletions(-)
New commits:
commit e41d66811b9fef1fa0e7d3c0911104893fe6915c
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Apr 10 13:37:19 2017 +0200
edlingu.cxx: remove some pointless OSL_ENSURE
Why check something that is guaranteed to be true by the if in the
previous line?
Change-Id: Ib941b0d3fd8042ddba9fa79885c4e5941bbc283e
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 1ca9914c3eaf..28619ca5c059 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -631,14 +631,12 @@ void SwEditShell::SpellStart(
// do not spell if interactive spelling is active elsewhere
if (!pConvArgs && !g_pSpellIter)
{
- OSL_ENSURE( !g_pSpellIter, "spell already active?" );
g_pSpellIter = new SwSpellIter;
pLinguIter = g_pSpellIter;
}
// do not do text conversion if it is active elsewhere
if (pConvArgs && !g_pConvIter)
{
- OSL_ENSURE( !g_pConvIter, "text conversion already active!" );
g_pConvIter = new SwConvIter( *pConvArgs );
pLinguIter = g_pConvIter;
}
@@ -665,14 +663,12 @@ void SwEditShell::SpellEnd( SwConversionArgs *pConvArgs, bool bRestoreSelection
{
if (!pConvArgs && g_pSpellIter && g_pSpellIter->GetSh() == this)
{
- OSL_ENSURE( g_pSpellIter, "where is my Iterator?" );
g_pSpellIter->End_(bRestoreSelection);
delete g_pSpellIter;
g_pSpellIter = nullptr;
}
if (pConvArgs && g_pConvIter && g_pConvIter->GetSh() == this)
{
- OSL_ENSURE( g_pConvIter, "where is my Iterator?" );
g_pConvIter->End_();
delete g_pConvIter;
g_pConvIter = nullptr;
@@ -755,7 +751,6 @@ void SwEditShell::HyphStart( SwDocPositions eStart, SwDocPositions eEnd )
// do not hyphenate if interactive hyphenation is active elsewhere
if (!g_pHyphIter)
{
- OSL_ENSURE( !g_pHyphIter, "who is already hyphenating?" );
g_pHyphIter = new SwHyphIter;
g_pHyphIter->Start( this, eStart, eEnd );
}
@@ -764,9 +759,9 @@ void SwEditShell::HyphStart( SwDocPositions eStart, SwDocPositions eEnd )
/// restore selections
void SwEditShell::HyphEnd()
{
+ assert(g_pHyphIter);
if (g_pHyphIter->GetSh() == this)
{
- OSL_ENSURE( g_pHyphIter, "No Iterator" );
g_pHyphIter->End();
delete g_pHyphIter;
g_pHyphIter = nullptr;
@@ -777,6 +772,7 @@ void SwEditShell::HyphEnd()
uno::Reference< uno::XInterface >
SwEditShell::HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
{
+ assert(g_pHyphIter);
if (g_pHyphIter->GetSh() != this)
return nullptr;
@@ -793,7 +789,6 @@ uno::Reference< uno::XInterface >
*pPageSt = 1;
}
- OSL_ENSURE( g_pHyphIter, "No Iterator" );
//JP 18.07.95: prevent displaying selection on error messages. NO StartAction so that all
// Paints are also disabled.
++mnStartAction;
@@ -813,14 +808,14 @@ uno::Reference< uno::XInterface >
*/
void SwEditShell::InsertSoftHyph( const sal_Int32 nHyphPos )
{
- OSL_ENSURE( g_pHyphIter, "where is my Iterator?" );
+ assert(g_pHyphIter);
g_pHyphIter->InsertSoftHyph( nHyphPos );
}
/// ignore hyphenation
void SwEditShell::HyphIgnore()
{
- OSL_ENSURE( g_pHyphIter, "No Iterator" );
+ assert(g_pHyphIter);
//JP 18.07.95: prevent displaying selection on error messages. NO StartAction so that all
// Paints are also disabled.
++mnStartAction;
commit fae4b8d79819e205b1746014c770d5fb13d86e22
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Apr 10 11:38:31 2017 +0200
gbuild: revert to -O0 instead of -Og for GCC --enable-debug/dbgutil builds
Unfortunately -Og doesn't work as well as advertised, variables are
optimized away too often.
See thread at
https://lists.freedesktop.org/archives/libreoffice/2017-April/077479.html
Change-Id: I5fc141ea9c7c6931aaf8220c7abf6b413326049e
diff --git a/config_host.mk.in b/config_host.mk.in
index 5796b56d184b..e60c80e326ed 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -242,7 +242,6 @@ export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
export HAVE_GCC_FNO_INLINE=@HAVE_GCC_FNO_INLINE@
export HAVE_GCC_FNO_SIZED_DEALLOCATION=@HAVE_GCC_FNO_SIZED_DEALLOCATION@
export HAVE_GCC_GGDB2=@HAVE_GCC_GGDB2@
-export HAVE_GCC_OG=@HAVE_GCC_OG@
export HAVE_GNUMAKE_FILE_FUNC=@HAVE_GNUMAKE_FILE_FUNC@
export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
export HAVE_LD_HASH_STYLE=@HAVE_LD_HASH_STYLE@
diff --git a/configure.ac b/configure.ac
index af0ffd882039..8398aa334a0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3750,7 +3750,6 @@ fi
HAVE_GCC_GGDB2=
HAVE_GCC_FINLINE_LIMIT=
HAVE_GCC_FNO_INLINE=
-HAVE_GCC_OG=
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([whether $CC supports -ggdb2])
if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
@@ -3801,22 +3800,6 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([no])
fi
- # clang as of version 4.0.0 (trunk 289424) doesn't do this very well (missing locals, bad param info in stack frame)
- if test "$COM_IS_CLANG" != "TRUE"; then
- AC_MSG_CHECKING([whether $CC supports -Og])
- # Note that clang-3.1 reports a real error for this option
- # so we do not need a special case for clang<=3.1 as above.
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror -Og"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_OG=TRUE ],[])
- CFLAGS=$save_CFLAGS
- if test "$HAVE_GCC_OG" = "TRUE"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- fi
-
if test "$host_cpu" = "m68k"; then
AC_MSG_CHECKING([whether $CC supports -mlong-jump-table-offsets])
save_CFLAGS=$CFLAGS
@@ -3833,7 +3816,6 @@ fi
AC_SUBST(HAVE_GCC_GGDB2)
AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
AC_SUBST(HAVE_GCC_FNO_INLINE)
-AC_SUBST(HAVE_GCC_OG)
dnl ===================================================================
dnl Test the gcc version
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 25125334840c..6b697fc9461c 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -186,9 +186,7 @@ ifeq ($(HAVE_GCC_FNO_DEFAULT_INLINE),TRUE)
FNO_DEFAULT_INLINE=-fno-default-inline
endif
-# note: this overrides -O0 from the gb_COMPILERNOOPTFLAGS with -Og if
-# available, so that the former remains no-optimization for when that is needed
-gb_DEBUG_CFLAGS := $(if $(HAVE_GCC_OG),-Og) $(FINLINE_LIMIT0) $(FNO_INLINE)
+gb_DEBUG_CFLAGS := $(FINLINE_LIMIT0) $(FNO_INLINE)
gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE)
More information about the Libreoffice-commits
mailing list