diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-12-03 01:38:59 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-12-03 01:38:59 +0000 |
| commit | 979f74d1ddcff4c406668912ec6568bb69e4f222 (patch) | |
| tree | 90c6bae5518c057a1aab2deec581abd9f31e7b2b /lldb/source/Expression/ClangASTSource.cpp | |
| parent | a41772aa0fe6233e8be3dc44870ecd11c92b5ec4 (diff) | |
| download | bcm5719-llvm-979f74d1ddcff4c406668912ec6568bb69e4f222.tar.gz bcm5719-llvm-979f74d1ddcff4c406668912ec6568bb69e4f222.zip | |
Fixed object lifetimes in ClangExpressionDeclMap
so that it is not referring to potentially stale
state during IR execution.
This was done by introducing modular state (like
ClangExpressionVariable) where groups of state
variables have well-defined lifetimes:
- m_parser_vars are specific to parsing, and only
exist between calls to WillParse() and DidParse().
- m_struct_vars survive for the entire execution
of the ClangExpressionDeclMap because they
provide the template for a materialized set of
expression variables.
- m_material_vars are specific to a single
instance of materialization, and only exist
between calls to Materialize() and
Dematerialize().
I also removed unnecessary references to long-
lived state that really didn't need to be referred
to at all, and also introduced several assert()s
that helped me diagnose a few bugs (fixed too).
llvm-svn: 120778
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
| -rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 95a35b9b098..09d6ed08032 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -83,7 +83,7 @@ DeclContext::lookup_result ClangASTSource::FindExternalVisibleDeclsByName // any lookups so we can avoid lookup up all of the builtin types. if (!decl_name.empty() && decl_name[0] == '$') { - m_decl_map.SetLookupsEnabled (true); + m_decl_map.SetLookupsEnabled (); } else { |

