mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use llvm casts in various places instead of looking at {Expr,Decl,TypeBase}::getKind()
Also add some FIXMEs for some code in debug info emission that looks incorrect.
This commit is contained in:
@@ -124,7 +124,7 @@ class AnnotatingPrinter : public StreamPrinter {
|
||||
}
|
||||
|
||||
void deinitDefaultMapToUse(const Decl*D) {
|
||||
if (D->getKind() == DeclKind::Extension) {
|
||||
if (isa<ExtensionDecl>(D)) {
|
||||
DefaultMapToUse = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
bool shouldContinuePre(const Decl *D, Optional<BracketOptions> Bracket) {
|
||||
assert(Bracket.hasValue());
|
||||
if (!Bracket.getValue().shouldOpenExtension(D) &&
|
||||
D->getKind() == DeclKind::Extension)
|
||||
isa<ExtensionDecl>(D))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
if (!Bracket.getValue().shouldCloseNominal(D) && dyn_cast<NominalTypeDecl>(D))
|
||||
return false;
|
||||
if (!Bracket.getValue().shouldCloseExtension(D) &&
|
||||
D->getKind() == DeclKind::Extension)
|
||||
isa<ExtensionDecl>(D))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user