summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/PDB
diff options
context:
space:
mode:
authorAlex Langford <apl@fb.com>2019-08-13 19:40:36 +0000
committerAlex Langford <apl@fb.com>2019-08-13 19:40:36 +0000
commitbddab07d4a219642e70b6ab786ee8c54c8108968 (patch)
tree6c8857ed265593f7e3ab529cef92a793e1440e32 /lldb/source/Plugins/SymbolFile/PDB
parent0fed4945d9056719e4f6c900ec392f35aca6a6f0 (diff)
downloadbcm5719-llvm-bddab07d4a219642e70b6ab786ee8c54c8108968.tar.gz
bcm5719-llvm-bddab07d4a219642e70b6ab786ee8c54c8108968.zip
[Symbol] Decouple clang from CompilerType
Summary: Ideally CompilerType would have no knowledge of clang or any individual TypeSystem. Decoupling clang is relatively straightforward. Differential Revision: https://reviews.llvm.org/D66102 llvm-svn: 368741
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/PDB')
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
index 4ab384e67e2..47c4ad08849 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -120,24 +120,31 @@ GetBuiltinTypeForPDBEncodingAndBitSize(ClangASTContext &clang_ast,
return clang_ast.GetBasicType(eBasicTypeBool);
case PDB_BuiltinType::Long:
if (width == ast->getTypeSize(ast->LongTy))
- return CompilerType(ast, ast->LongTy);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->LongTy.getAsOpaquePtr());
if (width == ast->getTypeSize(ast->LongLongTy))
- return CompilerType(ast, ast->LongLongTy);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->LongLongTy.getAsOpaquePtr());
break;
case PDB_BuiltinType::ULong:
if (width == ast->getTypeSize(ast->UnsignedLongTy))
- return CompilerType(ast, ast->UnsignedLongTy);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->UnsignedLongTy.getAsOpaquePtr());
if (width == ast->getTypeSize(ast->UnsignedLongLongTy))
- return CompilerType(ast, ast->UnsignedLongLongTy);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->UnsignedLongLongTy.getAsOpaquePtr());
break;
case PDB_BuiltinType::WCharT:
if (width == ast->getTypeSize(ast->WCharTy))
- return CompilerType(ast, ast->WCharTy);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->WCharTy.getAsOpaquePtr());
break;
case PDB_BuiltinType::Char16:
- return CompilerType(ast, ast->Char16Ty);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->Char16Ty.getAsOpaquePtr());
case PDB_BuiltinType::Char32:
- return CompilerType(ast, ast->Char32Ty);
+ return CompilerType(ClangASTContext::GetASTContext(ast),
+ ast->Char32Ty.getAsOpaquePtr());
case PDB_BuiltinType::Float:
// Note: types `long double` and `double` have same bit size in MSVC and
// there is no information in the PDB to distinguish them. So when falling
OpenPOWER on IntegriCloud