diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 2100989316446e087dc021711f70f357c5d37320..f2c647c2d98fdf39b4a4b5a81c5f74a14a5e8351 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -237,6 +237,14 @@ namespace {
 namespace
 {
 	std::string className(const std::type_info& type)
+	{
+		return LLError::Log::demangle(type.name());
+	}
+} // anonymous
+
+namespace LLError
+{
+	std::string Log::demangle(const char* mangled)
 	{
 #ifdef __GNUC__
 		// GCC: type_info::name() returns a mangled class name,st demangle
@@ -251,18 +259,18 @@ namespace
 			// but gcc 3.3 libstc++'s implementation of demangling is broken
 			// and fails without.
 			
-		char* name = abi::__cxa_demangle(type.name(),
+		char* name = abi::__cxa_demangle(mangled,
 										abi_name_buf, &abi_name_len, &status);
 			// this call can realloc the abi_name_buf pointer (!)
 
-		return name ? name : type.name();
+		return name ? name : mangled;
 
 #elif LL_WINDOWS
 		// DevStudio: type_info::name() includes the text "class " at the start
 
 		static const std::string class_prefix = "class ";
 
-		std::string name = type.name();
+		std::string name = mangled;
 		std::string::size_type p = name.find(class_prefix);
 		if (p == std::string::npos)
 		{
@@ -271,11 +279,14 @@ namespace
 
 		return name.substr(p + class_prefix.size());
 
-#else		
-		return type.name();
+#else
+		return mangled;
 #endif
 	}
+} // LLError
 
+namespace
+{
 	std::string functionName(const std::string& preprocessor_name)
 	{
 #if LL_WINDOWS
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 63040e1772a15b4a9239127df183e1b15a3a0df8..d0ddb5e8e92b62685afd3d426ac8becdbe92acc8 100755
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -189,6 +189,7 @@ namespace LLError
 		static std::ostringstream* out();
 		static void flush(std::ostringstream* out, char* message);
 		static void flush(std::ostringstream*, const CallSite&);
+		static std::string demangle(const char* mangled);
 	};
 	
 	struct LL_COMMON_API CallSite