From b50ba67bd8ab329d598ce47e5d3ac09b59fffb63 Mon Sep 17 00:00:00 2001
From: James Cook <james@lindenlab.com>
Date: Sun, 29 Nov 2009 10:19:17 -0800
Subject: [PATCH] Revert extern template link optimization until I can
 build/test on PC

---
 indra/llui/llbutton.cpp        |  4 ++--
 indra/llui/llcheckboxctrl.cpp  |  4 ++--
 indra/llui/lllineeditor.cpp    |  4 ++--
 indra/llui/llpanel.cpp         |  4 ++--
 indra/llui/lltextbox.cpp       |  4 ++--
 indra/llui/lltexteditor.cpp    |  4 ++--
 indra/llui/lluictrl.cpp        |  4 ++--
 indra/llui/lluictrlfactory.h   |  2 +-
 indra/llui/llview.cpp          |  2 +-
 indra/llui/llview.h            | 32 ++++++++++++++++----------------
 indra/newview/llbottomtray.h   |  2 +-
 indra/newview/llselectmgr.h    |  2 +-
 indra/newview/llviewercamera.h |  2 +-
 13 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index ae25aec2065..617a97b6cf0 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -57,8 +57,8 @@
 static LLDefaultChildRegistry::Register<LLButton> r("button");
 
 // Compiler optimization, generate extern template
-template class LLButton* LLView::getChild<class LLButton>(
-	const std::string& name, BOOL recurse) const;
+//template class LLButton* LLView::getChild<class LLButton>(
+//	const std::string& name, BOOL recurse) const;
 
 // globals loaded from settings.xml
 S32	LLBUTTON_H_PAD	= 0;
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index 33630dbb5e1..3c5925f9657 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -51,8 +51,8 @@ const U32 MAX_STRING_LENGTH = 10;
 static LLDefaultChildRegistry::Register<LLCheckBoxCtrl> r("check_box");
 
 // Compiler optimization, generate extern template
-template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
-	const std::string& name, BOOL recurse) const;
+//template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
+//	const std::string& name, BOOL recurse) const;
 
 LLCheckBoxCtrl::Params::Params()
 :	text_enabled_color("text_enabled_color"),
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index cade6e45e13..1551aab192f 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -72,8 +72,8 @@ const F32	TRIPLE_CLICK_INTERVAL = 0.3f;	// delay between double and triple click
 static LLDefaultChildRegistry::Register<LLLineEditor> r1("line_editor");
 
 // Compiler optimization, generate extern template
-template class LLLineEditor* LLView::getChild<class LLLineEditor>(
-	const std::string& name, BOOL recurse) const;
+//template class LLLineEditor* LLView::getChild<class LLLineEditor>(
+//	const std::string& name, BOOL recurse) const;
 
 //
 // Member functions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 3a6c55ba0e1..dc5db03a44f 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -59,8 +59,8 @@
 static LLDefaultChildRegistry::Register<LLPanel> r1("panel", &LLPanel::fromXML);
 
 // Compiler optimization, generate extern template
-template class LLPanel* LLView::getChild<class LLPanel>(
-	const std::string& name, BOOL recurse) const;
+//template class LLPanel* LLView::getChild<class LLPanel>(
+//	const std::string& name, BOOL recurse) const;
 
 LLPanel::LocalizedString::LocalizedString()
 :	name("name"),
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index c0edccd0f3a..4bd9a32b1d7 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -41,8 +41,8 @@
 static LLDefaultChildRegistry::Register<LLTextBox> r("text");
 
 // Compiler optimization, generate extern template
-template class LLTextBox* LLView::getChild<class LLTextBox>(
-	const std::string& name, BOOL recurse) const;
+//template class LLTextBox* LLView::getChild<class LLTextBox>(
+//	const std::string& name, BOOL recurse) const;
 
 LLTextBox::LLTextBox(const LLTextBox::Params& p)
 :	LLTextBase(p),
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 628d566179b..6e07a890ade 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -74,8 +74,8 @@
 static LLDefaultChildRegistry::Register<LLTextEditor> r("simple_text_editor");
 
 // Compiler optimization, generate extern template
-template class LLTextEditor* LLView::getChild<class LLTextEditor>(
-	const std::string& name, BOOL recurse) const;
+//template class LLTextEditor* LLView::getChild<class LLTextEditor>(
+//	const std::string& name, BOOL recurse) const;
 
 //
 // Constants
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 466f45942d2..3cf592f3512 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -41,8 +41,8 @@
 static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl");
 
 // Compiler optimization, generate extern template
-template class LLUICtrl* LLView::getChild<class LLUICtrl>(
-	const std::string& name, BOOL recurse) const;
+//template class LLUICtrl* LLView::getChild<class LLUICtrl>(
+//	const std::string& name, BOOL recurse) const;
 
 LLUICtrl::Params::Params()
 :	tab_stop("tab_stop", true),
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index adb3f7202ff..e021c04ad64 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -109,7 +109,7 @@ extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION;
 extern LLFastTimer::DeclareTimer FTM_INIT_FROM_PARAMS;
 
 // Build time optimization, generate this once in .cpp file
-extern template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
+//extern template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
 
 class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 {
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 4fc52997a14..ef23268a143 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -77,7 +77,7 @@ BOOL LLView::sIsDrawing = FALSE;
 #endif
 
 // Compiler optimization, generate extern template
-template class LLView* LLView::getChild<class LLView>(const std::string& name, BOOL recurse) const;
+//template class LLView* LLView::getChild<class LLView>(const std::string& name, BOOL recurse) const;
 
 static LLDefaultChildRegistry::Register<LLView> r("view");
 
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 5bf015362d2..1b12e785099 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -661,21 +661,21 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co
 
 // Compiler optimization - don't generate these specializations inline,
 // require explicit specialization.  See llbutton.cpp for an example.
-extern template class LLButton* LLView::getChild<class LLButton>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLLineEditor* LLView::getChild<class LLLineEditor>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLPanel* LLView::getChild<class LLPanel>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLTextBox* LLView::getChild<class LLTextBox>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLTextEditor* LLView::getChild<class LLTextEditor>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLUICtrl* LLView::getChild<class LLUICtrl>(
-	const std::string& name, BOOL recurse) const;
-extern template class LLView* LLView::getChild<class LLView>(
-	const std::string& name, BOOL recurse) const;
+//extern template class LLButton* LLView::getChild<class LLButton>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLLineEditor* LLView::getChild<class LLLineEditor>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLPanel* LLView::getChild<class LLPanel>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLTextBox* LLView::getChild<class LLTextBox>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLTextEditor* LLView::getChild<class LLTextEditor>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLUICtrl* LLView::getChild<class LLUICtrl>(
+//	const std::string& name, BOOL recurse) const;
+//extern template class LLView* LLView::getChild<class LLView>(
+//	const std::string& name, BOOL recurse) const;
 
 #endif //LL_LLVIEW_H
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 3db5184f6b4..30f5f88cce9 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -48,7 +48,7 @@ class LLNearbyChatBar;
 class LLIMChiclet;
 
 // Build time optimization, generate this once in .cpp file
-extern template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
+//extern template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
 
 class LLBottomTray 
 	: public LLSingleton<LLBottomTray>
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 7a5c583711d..57e0ee4e0e1 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -324,7 +324,7 @@ class LLObjectSelection : public LLRefCount
 typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle;
 
 // Build time optimization, generate this once in .cpp file
-extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance();
+//extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance();
 
 class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr>
 {
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index 01fa86d7c5d..bf561c3e4d8 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -53,7 +53,7 @@ const BOOL FOR_SELECTION = TRUE;
 const BOOL NOT_FOR_SELECTION = FALSE;
 
 // Build time optimization, generate this once in .cpp file
-extern template class LLViewerCamera* LLSingleton<class LLViewerCamera>::getInstance();
+//extern template class LLViewerCamera* LLSingleton<class LLViewerCamera>::getInstance();
 
 class LLViewerCamera : public LLCamera, public LLSingleton<LLViewerCamera>
 {
-- 
GitLab