Bug 1399315 - declare explicit instantiations of Compare as NS_FASTCALL; r=erahm
authorNathan Froyd <froydnj@mozilla.com>
Wed, 13 Sep 2017 17:42:44 -0400
changeset 430316 93d73e65449839f2c38c6207b26f3d9209ea9487
parent 430315 79eb1b3a29284410ffe3f2c150a2f78cdaf6ac89
child 430317 968822d2cc5d7f5c4ca6df8f98f695a1b3729267
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1399315
milestone57.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 1399315 - declare explicit instantiations of Compare as NS_FASTCALL; r=erahm The template declaration and definition of Compare use NS_FASTCALL, while the explicit instantiation of Compare does not, which produces complaints from newer compilers. Add NS_FASTCALL to the explicit instantiation so that things match up.
xpcom/string/precompiled_templates.cpp
--- a/xpcom/string/precompiled_templates.cpp
+++ b/xpcom/string/precompiled_templates.cpp
@@ -44,23 +44,23 @@ template class nsTSubstringSplitter<char
 template class nsTDefaultStringComparator<char>;
 template class nsTDefaultStringComparator<char16_t>;
 
 // =============================
 // Templated top-level functions
 // =============================
 
 template
-int
+int NS_FASTCALL
 Compare<char>(mozilla::detail::nsTStringRepr<char> const&,
               mozilla::detail::nsTStringRepr<char> const&,
               nsTStringComparator<char> const&);
 
 template
-int
+int NS_FASTCALL
 Compare<char16_t>(mozilla::detail::nsTStringRepr<char16_t> const&,
                   mozilla::detail::nsTStringRepr<char16_t> const&,
                   nsTStringComparator<char16_t> const&);
 
 template
 nsTDependentSubstring<char> const
 Substring<char>(char const*, char const*);