llvm-project/lldb/source/Symbol
Greg Clayton 23c12ca922 Make sure that we succeed in starting a definition before we complete it and emit an error if we fail to start the definition.
ClangASTContext::StartTagDeclarationDefinition(...) was starting definitions for any TagType instances that have TagDecl, but ClangASTContext::CompleteTagDeclarationDefinition(...) was getting the type to a CXXRecordDecl with:

    clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
    
The problem is that getAsCXXRecordDecl() might dig a bit deeper into a type and dig out a different decl, which means we might call ClangASTContext::StartTagDeclarationDefinition(...), but it might not do anything, and then we might call ClangASTContext::CompleteTagDeclarationDefinition(...) and it might try to complete something that didn't have its definition started and this will crash.

This change fixes that, and also makes sure that starting a definition succeeds before any calls to ClangASTContext::CompleteTagDeclarationDefinition().
                                                    
<rdar://problem/24091798>

llvm-svn: 270891
2016-05-26 19:24:02 +00:00
..
ArmUnwindInfo.cpp Fix several issues around .ARM.exidx section handling 2015-10-02 11:58:26 +00:00
Block.cpp Handle the case when a variable is only valid in part of the enclosing scope 2016-02-25 12:23:37 +00:00
CMakeLists.txt Move some functions from DWARFASTParserClang to ClangASTImporter. 2016-03-28 22:53:41 +00:00
ClangASTContext.cpp Make sure that we succeed in starting a definition before we complete it and emit an error if we fail to start the definition. 2016-05-26 19:24:02 +00:00
ClangASTImporter.cpp Move some functions from DWARFASTParserClang to ClangASTImporter. 2016-03-28 22:53:41 +00:00
ClangExternalASTSourceCallbacks.cpp Trying to submit 254476 one more time. This implement -gmodule debugging support. 2015-12-08 01:02:08 +00:00
ClangExternalASTSourceCommon.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
ClangUtil.cpp Add some unit tests for ClangASTContext. 2016-04-01 23:20:35 +00:00
CompactUnwindInfo.cpp Add support for arm64 compact unwind tables, used on darwin arm64 2016-05-25 04:20:28 +00:00
CompileUnit.cpp Read macro info from .debug_macro section and use it for expression evaluation. 2015-12-16 00:22:08 +00:00
CompilerDecl.cpp Removed the m_decl_objects map from ClangASTContext. 2016-05-23 18:30:59 +00:00
CompilerDeclContext.cpp Take 2: Use an artifical namespace so that member vars do not hide local vars. 2016-02-05 19:10:04 +00:00
CompilerType.cpp Import block pointers from DWARF as Clang block pointers, not as structs. 2016-05-02 21:15:31 +00:00
DWARFCallFrameInfo.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
DebugMacros.cpp Read macro info from .debug_macro section and use it for expression evaluation. 2015-12-16 00:22:08 +00:00
Declaration.cpp For some reason, sometimes the directory paths that clang emits have internal 2014-11-15 01:54:26 +00:00
FuncUnwinders.cpp remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Function.cpp The compiler may use "line number 0" to indicate compiler generated goo that it can't 2016-02-03 00:07:23 +00:00
GoASTContext.cpp Import block pointers from DWARF as Clang block pointers, not as structs. 2016-05-02 21:15:31 +00:00
JavaASTContext.cpp Removed the m_decl_objects map from ClangASTContext. 2016-05-23 18:30:59 +00:00
LineEntry.cpp Keep original source path and mapped path in LineEntry 2016-05-11 22:46:53 +00:00
LineTable.cpp Keep original source path and mapped path in LineEntry 2016-05-11 22:46:53 +00:00
ObjectFile.cpp remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Symbol.cpp Unconditionally accept symbol sizes from elf 2016-01-19 10:24:51 +00:00
SymbolContext.cpp Keep original source path and mapped path in LineEntry 2016-05-11 22:46:53 +00:00
SymbolFile.cpp Now that SymbolFileDWARF supports having types in completely separate .pcm file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: 2016-02-10 21:28:13 +00:00
SymbolVendor.cpp remove use of Mutex in favour of std::{,recursive_}mutex 2016-05-18 01:59:10 +00:00
Symtab.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
Type.cpp When creating typedefs, don't call Type::GetName() since that might recursively call "lldb_private::Type::ResolveClangType(lldb_private::Type::ResolveStateTag)" and cause a crash. A lldb_private::Type should have a valid name if it is created without a backing CompilerType. Also provide a name that we can recognize so if we see it in a as the typename of a variable, we will know to check it out. This crash is happening quite a bit and we need to determine if this is due to incorrect debug info, or just due to some bug in LLDBD. 2016-03-29 18:22:07 +00:00
TypeList.cpp Testcase and fix for bug 24074 2015-10-08 09:45:41 +00:00
TypeMap.cpp Fix a crasher in SymbolContext::SortTypeList() where something that was iterating over a std::multimap was actually mutating the list. 2015-11-19 23:10:45 +00:00
TypeSystem.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
UnwindPlan.cpp Fix handling of the arm IT instruction in the unwinder 2016-02-10 10:42:13 +00:00
UnwindTable.cpp second pass over removal of Mutex and Condition 2016-05-19 05:13:57 +00:00
Variable.cpp Removed the m_decl_objects map from ClangASTContext. 2016-05-23 18:30:59 +00:00
VariableList.cpp Fix resolution conflict between global and class static variables in C++ 2015-08-18 22:46:57 +00:00
VerifyDecl.cpp