diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index f2d6946ecad..2e52eff7617 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -699,6 +699,15 @@ dlang_function_args (string *decl, const char *mangled, struct dlang_info *info) switch (*mangled) { + case 'I': /* in(T) */ + mangled++; + string_append (decl, "in "); + if (*mangled == 'K') /* in ref(T) */ + { + mangled++; + string_append (decl, "ref "); + } + break; case 'J': /* out(T) */ mangled++; string_append (decl, "out "); @@ -826,7 +835,6 @@ dlang_type (string *decl, const char *mangled, struct dlang_info *info) mangled = dlang_function_type (decl, mangled, info); string_append (decl, "function"); return mangled; - case 'I': /* ident T */ case 'C': /* class T */ case 'S': /* struct T */ case 'E': /* enum T */ diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected index e3f32e31d7b..ffb317f23d4 100644 --- a/libiberty/testsuite/d-demangle-expected +++ b/libiberty/testsuite/d-demangle-expected @@ -274,14 +274,6 @@ _D8demangle4testFNhG4dZv demangle.test(__vector(double[4])) # --format=dlang -_D8demangle4testFI5identZv -demangle.test(ident) -# ---format=dlang -_D8demangle4testFI5ident4testZv -demangle.test(ident.test) -# ---format=dlang _D8demangle4testFC5classZv demangle.test(class) # @@ -314,6 +306,14 @@ _D8demangle4testFT7typedef4testZv demangle.test(typedef.test) # --format=dlang +_D8demangle4testFIaZv +demangle.test(in char) +# +--format=dlang +_D8demangle4testFIKaZv +demangle.test(in ref char) +# +--format=dlang _D8demangle4testFJaZv demangle.test(out char) #