diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-21 16:55:12 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-21 16:55:12 +0000 |
commit | a5cd80a8c4768bfdd7d5de1a2e5c937196ffa7ee (patch) | |
tree | 5ca44330914a3d158cd1060f4be0945ae1a2034c /staging_vespalib | |
parent | 8a207468027ef5f778cbf5b1808e3ad8b6310029 (diff) |
Factor out the code to get demangled classnames to a common place
Diffstat (limited to 'staging_vespalib')
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp b/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp index bac071c8048..c6459219fc4 100644 --- a/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp +++ b/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp @@ -9,7 +9,7 @@ #include "visit.h" #include "objectpredicate.h" #include "objectoperation.h" -#include <cxxabi.h> +#include <vespa/vespalib/util/classname.h> namespace vespalib { @@ -187,13 +187,7 @@ Identifiable::UP Identifiable::create(Deserializer & is) string Identifiable::getNativeClassName() const { - string name(typeid(*this).name()); - int status = 0; - size_t size = 0; - char *unmangled = abi::__cxa_demangle(name.c_str(), 0, &size, &status); - string result(unmangled); - free(unmangled); - return result; + return vespalib::getClassName(*this); } string |