diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-07-20 23:31:16 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-07-20 23:31:16 +0000 |
| commit | 1d1806641146f60f10e6269c7ec66f9ed1e5e88a (patch) | |
| tree | 18b2932eccbe33a5c44110136c5058303bf8382d /lldb/source/Expression/IRForTarget.cpp | |
| parent | e706501975e6415daae830be563bdfdead095121 (diff) | |
| download | bcm5719-llvm-1d1806641146f60f10e6269c7ec66f9ed1e5e88a.tar.gz bcm5719-llvm-1d1806641146f60f10e6269c7ec66f9ed1e5e88a.zip | |
Added functionality to dematerialize values that were
used by the JIT compiled expression, including the
result of the expression.
Also added a new class, ASTType, which encapsulates an
opaque Clang type and its associated AST context.
Refactored ClangExpressionDeclMap to use ASTTypes,
significantly reducing the possibility of mixups of
types from different AST contexts.
llvm-svn: 108965
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
| -rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 065c760d3f3..31f3343d82e 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -93,12 +93,18 @@ IRForTarget::MaybeHandleVariable(Module &M, std::string name = named_decl->getName().str(); void *qual_type = NULL; + clang::ASTContext *ast_context = NULL; if (clang::ValueDecl *value_decl = dyn_cast<clang::ValueDecl>(named_decl)) + { qual_type = value_decl->getType().getAsOpaquePtr(); + ast_context = &value_decl->getASTContext(); + } else + { return false; - + } + const llvm::Type *value_type = global_variable->getType(); size_t value_size = m_target_data->getTypeStoreSize(value_type); @@ -108,6 +114,7 @@ IRForTarget::MaybeHandleVariable(Module &M, named_decl, name, qual_type, + ast_context, value_size, value_alignment)) return false; |

