diff options
author | Sean Callanan <scallanan@apple.com> | 2010-08-13 22:52:29 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2010-08-13 22:52:29 +0000 |
commit | df4581f1c5c6c090024ffee38fec6229b5a73dfb (patch) | |
tree | 64f99d092e3d9b60f20c886f713c31607895b645 /lldb/source | |
parent | b14904c4a835c5e07a7c777696dda8180069760b (diff) | |
download | bcm5719-llvm-df4581f1c5c6c090024ffee38fec6229b5a73dfb.tar.gz bcm5719-llvm-df4581f1c5c6c090024ffee38fec6229b5a73dfb.zip |
Documented ClangExpressionVariable(List), and
cleaned up its API slightly.
llvm-svn: 111053
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Expression/ClangExpressionVariable.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lldb/source/Expression/ClangExpressionVariable.cpp b/lldb/source/Expression/ClangExpressionVariable.cpp index 40fee4b47f5..dce0316983c 100644 --- a/lldb/source/Expression/ClangExpressionVariable.cpp +++ b/lldb/source/Expression/ClangExpressionVariable.cpp @@ -33,14 +33,14 @@ ClangExpressionVariableList::~ClangExpressionVariableList() } Value * -ValueForDecl(ASTContext &ast_context, const VarDecl *var_decl) +ValueForDecl(const VarDecl *var_decl) { Value *ret = new Value; ret->SetContext(Value::eContextTypeOpaqueClangQualType, var_decl->getType().getAsOpaquePtr()); - uint64_t bit_width = ast_context.getTypeSize(var_decl->getType()); + uint64_t bit_width = var_decl->getASTContext().getTypeSize(var_decl->getType()); uint32_t byte_size = (bit_width + 7 ) / 8; @@ -50,7 +50,7 @@ ValueForDecl(ASTContext &ast_context, const VarDecl *var_decl) } Value * -ClangExpressionVariableList::GetVariableForVarDecl (ASTContext &ast_context, const VarDecl *var_decl, uint32_t& idx, bool can_create) +ClangExpressionVariableList::GetVariableForVarDecl (const VarDecl *var_decl, uint32_t& idx, bool can_create) { uint32_t num_variables = m_variables.size(); uint32_t var_index; @@ -71,7 +71,7 @@ ClangExpressionVariableList::GetVariableForVarDecl (ASTContext &ast_context, con ClangExpressionVariable val; val.m_var_decl = var_decl; - val.m_value = ValueForDecl(ast_context, var_decl); + val.m_value = ValueForDecl(var_decl); m_variables.push_back(val); return m_variables.back().m_value; @@ -85,16 +85,3 @@ ClangExpressionVariableList::GetVariableAtIndex (uint32_t idx) return NULL; } - -uint32_t -ClangExpressionVariableList::AppendValue (Value *value) -{ - uint32_t idx = m_variables.size(); - - ClangExpressionVariable val; - val.m_var_decl = NULL; - val.m_value = value; - - m_variables.push_back(val); - return idx; -} |