Bug 1117068 - Part c: Remove NEED_CPP_UNUSED_IMPLEMENTATIONS; r=mshal
authorMs2ger <ms2ger@gmail.com>
Mon, 05 Jan 2015 19:18:58 +0100
changeset 222050 2d323b539934cfdebaae103df53b1ab3c719d4a0
parent 222049 61fb6a19f9acf4e5a3e4b1cc67d0dfabb65bda5c
child 222051 cffdee8c23ad475528fea073db0e368ee5867510
push id28055
push userkwierso@gmail.com
push dateTue, 06 Jan 2015 00:19:38 +0000
treeherdermozilla-central@72d7ae169b09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1117068
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1117068 - Part c: Remove NEED_CPP_UNUSED_IMPLEMENTATIONS; r=mshal It is only used in one place, and that place is better off with MOZ_DELETE.
configure.in
dom/xul/templates/nsTemplateMatch.cpp
dom/xul/templates/nsTemplateMatch.h
js/src/configure.in
xpcom/xpcom-config.h.in
--- a/configure.in
+++ b/configure.in
@@ -3286,30 +3286,16 @@ AC_CACHE_CHECK(for C++ dynamic_cast to v
                             }],
                            ac_cv_cpp_dynamic_cast_void_ptr=yes,
                            ac_cv_cpp_dynamic_cast_void_ptr=no,
                            ac_cv_cpp_dynamic_cast_void_ptr=no)])
 if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
    AC_DEFINE(HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR)
 fi
 
-dnl note that this one is reversed - if the test fails, then
-dnl we require implementations of unused virtual methods. Which
-dnl really blows because it means we'll have useless vtable
-dnl bloat.
-AC_CACHE_CHECK(whether C++ requires implementation of unused virtual methods,
-               ac_cv_cpp_unused_required,
-               [AC_TRY_LINK(class X {private: virtual void never_called();};,
-                               X x;,
-                               ac_cv_cpp_unused_required=no,
-                               ac_cv_cpp_unused_required=yes)])
-if test "$ac_cv_cpp_unused_required" = yes ; then
-   AC_DEFINE(NEED_CPP_UNUSED_IMPLEMENTATIONS)
-fi
-
 
 # try harder, when checking for __thread support, see bug 521750 comment #33 and below
 # We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is
 # enabled, the linker in xcode 4.1 will crash. Without this it would crash when
 # linking XUL.
 _SAVE_LDFLAGS=$LDFLAGS
 LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS"
 AC_CACHE_CHECK(for __thread keyword for TLS variables,
@@ -9019,17 +9005,16 @@ dnl Spit out some output
 dnl ========================================================
 
 dnl The following defines are used by xpcom
 _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES
 CPP_THROW_NEW
 HAVE_CPP_AMBIGUITY_RESOLVING_USING
 HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
 HAVE_CPP_PARTIAL_SPECIALIZATION
-NEED_CPP_UNUSED_IMPLEMENTATIONS
 HAVE_GETPAGESIZE
 HAVE_ICONV
 HAVE_ICONV_WITH_CONST_INPUT
 HAVE_MBRTOWC
 HAVE_WCRTOMB
 HAVE_STATVFS64
 HAVE_STATVFS
 HAVE_STATFS64
--- a/dom/xul/templates/nsTemplateMatch.cpp
+++ b/dom/xul/templates/nsTemplateMatch.cpp
@@ -1,21 +1,16 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsTemplateMatch.h"
 #include "nsTemplateRule.h"
 
-#ifdef NEED_CPP_UNUSED_IMPLEMENTATIONS
-nsTemplateMatch::nsTemplateMatch(const nsTemplateMatch& aMatch) {}
-void nsTemplateMatch::operator=(const nsTemplateMatch& aMatch) {}
-#endif
-
 // static
 void
 nsTemplateMatch::Destroy(nsTemplateMatch*& aMatch, bool aRemoveResult)
 {
     if (aRemoveResult && aMatch->mResult)
         aMatch->mResult->HasBeenRemoved();
     ::delete aMatch;
     aMatch = nullptr;
--- a/dom/xul/templates/nsTemplateMatch.h
+++ b/dom/xul/templates/nsTemplateMatch.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsTemplateMatch_h__
 #define nsTemplateMatch_h__
 
+#include "mozilla/Attributes.h"
 #include "nsIContent.h"
 #include "nsIXULTemplateQueryProcessor.h"
 #include "nsIXULTemplateResult.h"
 #include "nsRuleNetwork.h"
 
 /**
  * A match object, where each match object is associated with one result.
  * There will be one match list for each unique id generated. However, since
@@ -125,14 +126,14 @@ public:
      * match that has a rule set (mRule) is the active match and generates
      * content. The next match is owned by the builder, which will delete
      * template matches when needed.
      */
     nsTemplateMatch *mNext;
 
 private:
 
-    nsTemplateMatch(const nsTemplateMatch& aMatch); // not to be implemented
-    void operator=(const nsTemplateMatch& aMatch); // not to be implemented
+    nsTemplateMatch(const nsTemplateMatch& aMatch) MOZ_DELETE;
+    void operator=(const nsTemplateMatch& aMatch) MOZ_DELETE;
 };
 
 #endif // nsTemplateMatch_h__
 
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2642,31 +2642,16 @@ AC_CACHE_CHECK(for C++ dynamic_cast to v
                            ac_cv_cpp_dynamic_cast_void_ptr=yes,
                            ac_cv_cpp_dynamic_cast_void_ptr=no,
                            ac_cv_cpp_dynamic_cast_void_ptr=no)])
 if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
    AC_DEFINE(HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR)
 fi
 
 
-dnl note that this one is reversed - if the test fails, then
-dnl we require implementations of unused virtual methods. Which
-dnl really blows because it means we'll have useless vtable
-dnl bloat.
-AC_CACHE_CHECK(whether C++ requires implementation of unused virtual methods,
-               ac_cv_cpp_unused_required,
-               [AC_TRY_LINK(class X {private: virtual void never_called();};,
-                               X x;,
-                               ac_cv_cpp_unused_required=no,
-                               ac_cv_cpp_unused_required=yes)])
-if test "$ac_cv_cpp_unused_required" = yes ; then
-   AC_DEFINE(NEED_CPP_UNUSED_IMPLEMENTATIONS)
-fi
-
-
 # try harder, when checking for __thread support, see bug 521750 comment #33 and below
 # We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is
 # enabled, the linker in xcode 4.1 will crash. Without this it would crash when
 # linking XUL.
 _SAVE_LDFLAGS=$LDFLAGS
 LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS"
 AC_CACHE_CHECK(for __thread keyword for TLS variables,
                ac_cv_thread_keyword,
--- a/xpcom/xpcom-config.h.in
+++ b/xpcom/xpcom-config.h.in
@@ -13,21 +13,16 @@
 #undef CPP_THROW_NEW
 
 /* Define if the c++ compiler can resolve ambiguity with |using| */
 #undef HAVE_CPP_AMBIGUITY_RESOLVING_USING
 
 /* Define if a dyanmic_cast to void* gives the most derived object */
 #undef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
 
-/* Define if the c++ compiler requires implementations of 
- * unused virtual methods
- */
-#undef NEED_CPP_UNUSED_IMPLEMENTATIONS
-
 /* Define to either __attribute__((malloc)) or nothing */
 #undef NS_ATTR_MALLOC
 
 /* Define to either __attribute__((warn_unused_result)) or nothing */
 #undef NS_WARN_UNUSED_RESULT
 
 /* Define to a string describing the XPCOM ABI in use */
 #undef TARGET_XPCOM_ABI