summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-10-22 16:45:48 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-10-22 16:45:48 +0000
commit061240c142debbe643c5ce78673f019f1c953511 (patch)
treeb477bc5fa5530a99c7ea4231cc7e68595d2c0634
parent839f7f23c0a652e2b799345fc3112ae0c5a03098 (diff)
downloadlibcxxabi_35a-061240c142debbe643c5ce78673f019f1c953511.tar.gz
Move local Db type out to namespace scope.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@193169 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--src/cxa_demangle.cpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp
index ba8225c..295d8a9 100644
--- a/src/cxa_demangle.cpp
+++ b/src/cxa_demangle.cpp
@@ -4591,6 +4591,29 @@ struct string_pair
String move_full() {return std::move(first) + std::move(second);}
};
+struct Db
+{
+ typedef String String;
+ typedef Vector<string_pair> sub_type;
+ typedef Vector<sub_type> template_param_type;
+ Vector<string_pair> names;
+ Vector<sub_type> subs;
+ Vector<template_param_type> template_param;
+ unsigned cv;
+ unsigned ref;
+ bool parsed_ctor_dtor_cv;
+ bool tag_templates;
+ bool fix_forward_references;
+ bool try_to_parse_template_args;
+
+ template <size_t N>
+ Db(arena<N>& ar) :
+ names(ar),
+ subs(0, names, ar),
+ template_param(0, subs, ar)
+ {}
+};
+
} // unnamed namespace
__attribute__ ((__visibility__("default")))
@@ -4606,28 +4629,6 @@ __cxa_demangle(const char* mangled_name, char* buf, size_t* n, int* status)
}
size_t internal_size = buf != nullptr ? *n : 0;
arena<bs> a;
- struct Db
- {
- typedef String String;
- typedef Vector<string_pair> sub_type;
- typedef Vector<sub_type> template_param_type;
- Vector<string_pair> names;
- Vector<sub_type> subs;
- Vector<template_param_type> template_param;
- unsigned cv;
- unsigned ref;
- bool parsed_ctor_dtor_cv;
- bool tag_templates;
- bool fix_forward_references;
- bool try_to_parse_template_args;
-
- template <size_t N>
- Db(arena<N>& ar) :
- names(ar),
- subs(0, names, ar),
- template_param(0, subs, ar)
- {}
- };
Db db(a);
db.cv = 0;
db.ref = 0;