mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Demangler] Tidy up a bit, and add line numbers to ManglingErrors.
Because DEMANGLER_ASSERT() might cause the remanglers to return a ManglingError with the code ManglingError::AssertionFailed, it's useful to have a line number in the ManglingError as well as the other information. This is also potentially helpful for other cases where the code is used multiple times in the remanglers. rdar://79725187
This commit is contained in:
@@ -644,9 +644,10 @@ void swift_reflection_dumpInfoForTypeRef(SwiftReflectionContextRef ContextRef,
|
||||
MangledName.c_str());
|
||||
} else {
|
||||
MangledName = "<failed to mangle name>";
|
||||
fprintf(stdout, "Failed to get mangled name: Node %p, error code %d\n",
|
||||
Mangling.errorNode(),
|
||||
Mangling.errorCode());
|
||||
fprintf(stdout, "Failed to get mangled name: Node %p, error %d:%u\n",
|
||||
Mangling.error().node,
|
||||
Mangling.error().code,
|
||||
Mangling.error().line);
|
||||
}
|
||||
|
||||
char *DemangledName =
|
||||
|
||||
Reference in New Issue
Block a user