Skip to content

Commit 1d2e1ed

Browse files
committed
[AST] NFC: Move VarDecl::getPointerAuthQualifier implementation to Decl.cpp
1 parent 36ab596 commit 1d2e1ed

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/AST/Decl.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7125,6 +7125,15 @@ void VarDecl::emitLetToVarNoteIfSimple(DeclContext *UseDC) const {
71257125
}
71267126
}
71277127

7128+
clang::PointerAuthQualifier VarDecl::getPointerAuthQualifier() const {
7129+
if (auto *clangDecl = getClangDecl()) {
7130+
if (auto *valueDecl = dyn_cast<clang::ValueDecl>(clangDecl)) {
7131+
return valueDecl->getType().getPointerAuth();
7132+
}
7133+
}
7134+
return clang::PointerAuthQualifier();
7135+
}
7136+
71287137
ParamDecl::ParamDecl(SourceLoc specifierLoc,
71297138
SourceLoc argumentNameLoc, Identifier argumentName,
71307139
SourceLoc parameterNameLoc, Identifier parameterName,

lib/AST/TypeWrapper.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,3 @@ bool VarDecl::isTypeWrapperLocalStorageForInitializer() const {
4444
}
4545
return false;
4646
}
47-
48-
clang::PointerAuthQualifier VarDecl::getPointerAuthQualifier() const {
49-
if (auto *clangDecl = getClangDecl()) {
50-
if (auto *valueDecl = dyn_cast<clang::ValueDecl>(clangDecl)) {
51-
return valueDecl->getType().getPointerAuth();
52-
}
53-
}
54-
return clang::PointerAuthQualifier();
55-
}

0 commit comments

Comments
 (0)