Fixed an error in the type map for "char **" that was a bad memory smasher.
Anytime we had a valid python list that was trying to go from Python down into
our C++ API, it was allocating too little memory and it ended up smashing
whatever was next to the allocated memory.
Added typemap conversions for "void *, size_t" so we can get
SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t"
so we can get SBProcess::WriteMemory() to work.
Fixed an issue in the DWARF parser where we weren't correctly calculating the
DeclContext for all types and classes. We now should be a lot more accurate.
Fixes include: enums should now be setting their parent decl context correctly.
We saw a lot of examples where enums in classes were not being properly
namespace scoped. Also, classes within classes now get properly scoped.
Fixed the objective C runtime pointer checkers to let "nil" pointers through
since these are accepted by compiled code. We also now don't call "abort()"
when a pointer doesn't validate correctly since this was wreaking havoc on
the process due to the way abort() works. We now just dereference memory
which should give us an exception from which we can easily and reliably
recover.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123428 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/ClangASTContext.cpp b/source/Symbol/ClangASTContext.cpp
index 19dbd88..e7e948b 100644
--- a/source/Symbol/ClangASTContext.cpp
+++ b/source/Symbol/ClangASTContext.cpp
@@ -3487,7 +3487,13 @@
#pragma mark Enumeration Types
clang_type_t
-ClangASTContext::CreateEnumerationType (const Declaration &decl, const char *name, clang_type_t integer_qual_type)
+ClangASTContext::CreateEnumerationType
+(
+ const char *name,
+ DeclContext *decl_ctx,
+ const Declaration &decl,
+ clang_type_t integer_qual_type
+)
{
// TODO: Do something intelligent with the Declaration object passed in
// like maybe filling in the SourceLocation with it...
@@ -3499,7 +3505,7 @@
// const bool IsFixed = false;
EnumDecl *enum_decl = EnumDecl::Create (*ast_context,
- ast_context->getTranslationUnitDecl(),
+ decl_ctx,
SourceLocation(),
name && name[0] ? &ast_context->Idents.get(name) : NULL,
SourceLocation(),