summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2025-05-21 12:03:58 -0700
committerGitHub <noreply@github.com>2025-05-21 12:03:58 -0700
commite424787a95f2b88ff6f724fd92d87dd0f1cecddc (patch)
treef616c709c04b6c761fb6f9de04ab64d4b7ef6f3d /lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
parent77c8d214131e951e3d3a07b45a7436f54988d6f3 (diff)
[lldb] Add templated CompilerType::GetTypeSystem (NFC) (#140424)
Add an overloaded `GetTypeSystem` to specify the expected type system subclass. Changes code from `GetTypeSystem().dyn_cast_or_null<TypeSystemClang>()` to `GetTypeSystem<TypeSystemClang>()`.
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index 34129807277d..4b52f6aafcb7 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -1477,8 +1477,7 @@ ClangASTImporter::DeclOrigin ClangASTSource::GetDeclOrigin(const clang::Decl *de
}
CompilerType ClangASTSource::GuardedCopyType(const CompilerType &src_type) {
- auto ts = src_type.GetTypeSystem();
- auto src_ast = ts.dyn_cast_or_null<TypeSystemClang>();
+ auto src_ast = src_type.GetTypeSystem<TypeSystemClang>();
if (!src_ast)
return {};