mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ASTDemangler: Fix demangling of weak/unowned/unowned(unsafe)
The check here was incorrect because we might have an optional of a reference type as well. Just remove the check to keep things simple.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "swift/AST/ASTDemangler.h"
|
||||
#include "swift/AST/PrintOptions.h"
|
||||
#include "swift/ASTSectionImporter/ASTSectionImporter.h"
|
||||
#include "swift/Frontend/Frontend.h"
|
||||
#include "swift/IDE/Utils.h"
|
||||
@@ -99,7 +100,9 @@ static void resolveTypeFromMangledNameList(
|
||||
if (!ResolvedType) {
|
||||
llvm::outs() << "Can't resolve type of " << Mangled << "\n";
|
||||
} else {
|
||||
ResolvedType->print(llvm::outs());
|
||||
swift::PrintOptions PO;
|
||||
PO.PrintStorageRepresentationAttrs = true;
|
||||
ResolvedType->print(llvm::outs(), PO);
|
||||
llvm::outs() << "\n";
|
||||
}
|
||||
}
|
||||
@@ -114,7 +117,9 @@ static void resolveTypeFromMangledNameListOld(
|
||||
if (!ResolvedType) {
|
||||
llvm::errs() << "Can't resolve type of " << Mangled << "\n";
|
||||
} else {
|
||||
ResolvedType->print(llvm::errs());
|
||||
swift::PrintOptions PO;
|
||||
PO.PrintStorageRepresentationAttrs = true;
|
||||
ResolvedType->print(llvm::errs(), PO);
|
||||
llvm::errs() << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user