diff options
author | Zachary Turner <zturner@google.com> | 2018-12-20 23:32:37 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-12-20 23:32:37 +0000 |
commit | f0dbf5f5aaf945a719066e0e10e9a42a84817af2 (patch) | |
tree | ba84ac9417797f9891fbeaa77f0095d22b987c35 /source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | |
parent | 3c0fd3936b93c87f8505861fe32e6a243b2c8784 (diff) |
[NativePDB] Create VarDecls for global variables.
Previously we would create these for local variables but not for
global variables.
Also updated existing tests which created global variables to check
for them in the resulting AST.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@349854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp')
-rw-r--r-- | source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index bd44474fa..b41e52eb6 100644 --- a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -759,6 +759,8 @@ VariableSP SymbolFileNativePDB::CreateGlobalVariable(PdbGlobalSymId var_id) { std::make_shared<SymbolFileType>(*this, toOpaqueUid(tid)); Variable::RangeList ranges; + m_ast->GetOrCreateGlobalVariableDecl(var_id); + DWARFExpression location = MakeGlobalLocationExpression( section, offset, GetObjectFile()->GetModule()); |