[lldb][NFC] Add safe Decl->CompilerDecl conversion function TypeSystemClang
authorRaphael Isemann <teemperor@gmail.com>
Fri, 31 Jan 2020 08:22:25 +0000 (09:22 +0100)
committerRaphael Isemann <teemperor@gmail.com>
Fri, 31 Jan 2020 08:44:24 +0000 (09:44 +0100)
commit46ca55f2a2c88609657dff7f49ec54d5a71032d3
treee42d7910b80d162266624c34fc0411930ed11bf6
parent48acece15dcf63cb4fee043a4e66ddf3917a359a
[lldb][NFC] Add safe Decl->CompilerDecl conversion function TypeSystemClang

This adds a conversion function from clang::Decl to CompilerDecl. It checks
that the TypeSystemClang in the CompilerDecl actually fits to the clang::Decl
AST during creation, thus preventing the creation of CompilerDecl instances with
inconsistent state.
lldb/include/lldb/Symbol/TypeSystemClang.h
lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/source/Symbol/TypeSystemClang.cpp