@@ -55,22 +55,23 @@ Decorated(cl::Positional, cl::desc("<mangled>"), cl::ZeroOrMore);
55
55
static std::string demangle (llvm::raw_ostream &OS, const std::string &Mangled) {
56
56
int Status;
57
57
58
- const char *Decorated = Mangled.c_str ();
58
+ const char *DecoratedStr = Mangled.c_str ();
59
59
if (StripUnderscore)
60
- if (Decorated [0 ] == ' _' )
61
- ++Decorated ;
62
- size_t DecoratedLength = strlen (Decorated );
60
+ if (DecoratedStr [0 ] == ' _' )
61
+ ++DecoratedStr ;
62
+ size_t DecoratedLength = strlen (DecoratedStr );
63
63
64
64
char *Undecorated = nullptr ;
65
65
66
- if (Types || ((DecoratedLength >= 2 && strncmp (Decorated, " _Z" , 2 ) == 0 ) ||
67
- (DecoratedLength >= 4 && strncmp (Decorated, " ___Z" , 4 ) == 0 )))
68
- Undecorated = itaniumDemangle (Decorated, nullptr , nullptr , &Status);
66
+ if (Types ||
67
+ ((DecoratedLength >= 2 && strncmp (DecoratedStr, " _Z" , 2 ) == 0 ) ||
68
+ (DecoratedLength >= 4 && strncmp (DecoratedStr, " ___Z" , 4 ) == 0 )))
69
+ Undecorated = itaniumDemangle (DecoratedStr, nullptr , nullptr , &Status);
69
70
70
71
if (!Undecorated &&
71
- (DecoratedLength > 6 && strncmp (Decorated , " __imp_" , 6 ) == 0 )) {
72
+ (DecoratedLength > 6 && strncmp (DecoratedStr , " __imp_" , 6 ) == 0 )) {
72
73
OS << " import thunk for " ;
73
- Undecorated = itaniumDemangle (Decorated + 6 , nullptr , nullptr , &Status);
74
+ Undecorated = itaniumDemangle (DecoratedStr + 6 , nullptr , nullptr , &Status);
74
75
}
75
76
76
77
std::string Result (Undecorated ? Undecorated : Mangled);
0 commit comments