Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/lldb/Symbol/CompilerDeclContext.h b/linux-x64/clang/include/lldb/Symbol/CompilerDeclContext.h
index e7958c0..87d4ca3 100644
--- a/linux-x64/clang/include/lldb/Symbol/CompilerDeclContext.h
+++ b/linux-x64/clang/include/lldb/Symbol/CompilerDeclContext.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef liblldb_CompilerDeclContext_h_
-#define liblldb_CompilerDeclContext_h_
+#ifndef LLDB_SYMBOL_COMPILERDECLCONTEXT_H
+#define LLDB_SYMBOL_COMPILERDECLCONTEXT_H
#include <vector>
@@ -16,16 +16,32 @@
namespace lldb_private {
+/// Represents a generic declaration context in a program. A declaration context
+/// is data structure that contains declarations (e.g. namespaces).
+///
+/// This class serves as an abstraction for a declaration context inside one of
+/// the TypeSystems implemented by the language plugins. It does not have any
+/// actual logic in it but only stores an opaque pointer and a pointer to the
+/// TypeSystem that gives meaning to this opaque pointer. All methods of this
+/// class should call their respective method in the TypeSystem interface and
+/// pass the opaque pointer along.
+///
+/// \see lldb_private::TypeSystem
class CompilerDeclContext {
public:
- // Constructors and Destructors
- CompilerDeclContext() : m_type_system(nullptr), m_opaque_decl_ctx(nullptr) {}
+ /// Constructs an invalid CompilerDeclContext.
+ CompilerDeclContext() = default;
+ /// Constructs a CompilerDeclContext with the given opaque decl context
+ /// and its respective TypeSystem instance.
+ ///
+ /// This constructor should only be called from the respective TypeSystem
+ /// implementation.
+ ///
+ /// \see lldb_private::TypeSystemClang::CreateDeclContext(clang::DeclContext*)
CompilerDeclContext(TypeSystem *type_system, void *decl_ctx)
: m_type_system(type_system), m_opaque_decl_ctx(decl_ctx) {}
- ~CompilerDeclContext() {}
-
// Tests
explicit operator bool() const { return IsValid(); }
@@ -40,8 +56,6 @@
return m_type_system != nullptr && m_opaque_decl_ctx != nullptr;
}
- bool IsClang() const;
-
std::vector<CompilerDecl> FindDeclByName(ConstString name,
const bool ignore_using_decls);
@@ -102,11 +116,9 @@
ConstString GetScopeQualifiedName() const;
- bool IsStructUnionOrClass() const;
-
private:
- TypeSystem *m_type_system;
- void *m_opaque_decl_ctx;
+ TypeSystem *m_type_system = nullptr;
+ void *m_opaque_decl_ctx = nullptr;
};
bool operator==(const CompilerDeclContext &lhs, const CompilerDeclContext &rhs);
@@ -114,4 +126,4 @@
} // namespace lldb_private
-#endif // #ifndef liblldb_CompilerDeclContext_h_
+#endif // LLDB_SYMBOL_COMPILERDECLCONTEXT_H