summaryrefslogtreecommitdiff
path: root/include/lldb/Symbol/ClangExternalASTSourceCommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Symbol/ClangExternalASTSourceCommon.h')
-rw-r--r--include/lldb/Symbol/ClangExternalASTSourceCommon.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/lldb/Symbol/ClangExternalASTSourceCommon.h b/include/lldb/Symbol/ClangExternalASTSourceCommon.h
index 17650f7f14fd..711be42c15fb 100644
--- a/include/lldb/Symbol/ClangExternalASTSourceCommon.h
+++ b/include/lldb/Symbol/ClangExternalASTSourceCommon.h
@@ -20,6 +20,7 @@
// file. So we have to define NDEBUG when including clang headers to avoid any
// mismatches. This is covered by rdar://problem/8691220
+// C Includes
#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
#define LLDB_DEFINED_NDEBUG_FOR_CLANG
#define NDEBUG
@@ -27,8 +28,6 @@
#include <assert.h>
#endif
-#include "clang/AST/ExternalASTSource.h"
-
#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
#undef NDEBUG
#undef LLDB_DEFINED_NDEBUG_FOR_CLANG
@@ -36,6 +35,11 @@
#include <assert.h>
#endif
+// C++ Includes
+// Other libraries and framework includes
+#include "clang/AST/ExternalASTSource.h"
+
+// Project includes
#include "lldb/lldb-defines.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/Core/dwarf.h"
@@ -124,8 +128,8 @@ public:
return lldb::eLanguageTypeC_plus_plus;
}
return lldb::eLanguageTypeUnknown;
-
}
+
const char *
GetObjectPtrName() const
{
@@ -137,7 +141,7 @@ public:
return "this";
}
else
- return NULL;
+ return nullptr;
}
bool
@@ -155,19 +159,19 @@ private:
lldb::user_id_t m_user_id;
uint64_t m_isa_ptr;
};
+
bool m_union_is_user_id : 1,
m_union_is_isa_ptr : 1,
m_has_object_ptr : 1,
m_is_self : 1,
m_is_dynamic_cxx : 1;
-
};
class ClangExternalASTSourceCommon : public clang::ExternalASTSource
{
public:
ClangExternalASTSourceCommon();
- ~ClangExternalASTSourceCommon();
+ ~ClangExternalASTSourceCommon() override;
ClangASTMetadata *GetMetadata(const void *object);
void SetMetadata(const void *object, ClangASTMetadata &metadata);
@@ -175,12 +179,13 @@ public:
static ClangExternalASTSourceCommon *
Lookup(clang::ExternalASTSource *source);
+
private:
typedef llvm::DenseMap<const void *, ClangASTMetadata> MetadataMap;
MetadataMap m_metadata;
};
-}
+} // namespace lldb_private
-#endif
+#endif // liblldb_ClangExternalASTSourceCommon_h