Merge "Fix handling of _ZLXX." am: 9b537f24bd am: a11394356c

am: 930e0c3ad4

Change-Id: I13bf64e4979c37fde8d903540c69deb028a97cbd
This commit is contained in:
Christopher Ferris 2017-06-02 15:15:34 +00:00 committed by android-build-merger
commit 1109ce9b9f
2 changed files with 10 additions and 0 deletions

View file

@ -196,6 +196,14 @@ TEST(DemangleTest, FunctionStartsWithNumber) {
ASSERT_EQ("value(one, signed char)", demangler.Parse("_Z5value3onea"));
}
TEST(DemangleTest, FunctionStartsWithLPlusNumber) {
Demangler demangler;
ASSERT_EQ("value(char, int)", demangler.Parse("_ZL5valueci"));
ASSERT_EQ("abcdefjklmn(signed char)", demangler.Parse("_ZL11abcdefjklmna"));
ASSERT_EQ("value(one, signed char)", demangler.Parse("_ZL5value3onea"));
}
TEST(DemangleTest, StdTypes) {
Demangler demangler;

View file

@ -698,6 +698,8 @@ const char* Demangler::FindFunctionName(const char* name) {
if (std::isdigit(*name)) {
name = GetStringFromLength(name, &function_name_);
} else if (*name == 'L' && std::isdigit(name[1])) {
name = GetStringFromLength(name + 1, &function_name_);
} else {
name = AppendOperatorString(name);
function_name_ = cur_state_.str;