diff options
author | emaste <emaste@FreeBSD.org> | 2014-03-19 13:11:35 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-03-19 13:11:35 +0000 |
commit | 958843c32b7a29741f2e45996b5b3e89f9e108b0 (patch) | |
tree | 95ae4ffabc848a86b94be3ad3cd42471cdb66b06 /contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp | |
parent | 2a9993c246f3a2463ccd6b8786781e5b97a35065 (diff) | |
download | FreeBSD-src-958843c32b7a29741f2e45996b5b3e89f9e108b0.zip FreeBSD-src-958843c32b7a29741f2e45996b5b3e89f9e108b0.tar.gz |
MFC r258054: Update LLDB to upstream r194122 snapshot
Inludes minor changes relative to upstream, for compatibility with
FreeBSD's in-tree LLVM 3.3:
- Reverted LLDB r191806, restoring use of previous API.
- Reverted part of LLDB r189317, restoring previous enum names.
- Work around missing LLVM r192504, using previous registerEHFrames API
(limited functionality).
- Removed PlatformWindows header include and init/terminate calls.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp b/contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp index 177138d..b37044d 100644 --- a/contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp +++ b/contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp @@ -80,7 +80,6 @@ ClangFunction::ClangFunction m_function_ptr (&function), m_function_addr (), m_function_return_type (), - m_clang_ast_context (ast_context), m_wrapper_function_name ("__lldb_function_caller"), m_wrapper_struct_name ("__lldb_caller_struct"), m_wrapper_args_addrs (), @@ -112,7 +111,7 @@ ClangFunction::CompileFunction (Stream &errors) // FIXME: How does clang tell us there's no return value? We need to handle that case. unsigned num_errors = 0; - std::string return_type_str (m_function_return_type.GetTypeName()); + std::string return_type_str (m_function_return_type.GetTypeName().AsCString("")); // Cons up the function we're going to wrap our call in, then compile it... // We declare the function "extern "C"" because the compiler might be in C++ @@ -163,18 +162,18 @@ ClangFunction::CompileFunction (Stream &errors) if (trust_function) { - type_name = function_clang_type.GetFunctionArgumentTypeAtIndex(i).GetTypeName(); + type_name = function_clang_type.GetFunctionArgumentTypeAtIndex(i).GetTypeName().AsCString(""); } else { ClangASTType clang_qual_type = m_arg_values.GetValueAtIndex(i)->GetClangType (); if (clang_qual_type) { - type_name = clang_qual_type.GetTypeName(); + type_name = clang_qual_type.GetTypeName().AsCString(""); } else { - errors.Printf("Could not determine type of input value %lu.", i); + errors.Printf("Could not determine type of input value %zu.", i); return 1; } } @@ -345,7 +344,7 @@ ClangFunction::WriteFunctionArguments (ExecutionContext &exe_ctx, size_t num_args = arg_values.GetSize(); if (num_args != m_arg_values.GetSize()) { - errors.Printf ("Wrong number of arguments - was: %lu should be: %lu", num_args, m_arg_values.GetSize()); + errors.Printf ("Wrong number of arguments - was: %zu should be: %zu", num_args, m_arg_values.GetSize()); return false; } @@ -629,5 +628,7 @@ ClangFunction::ExecuteFunction( clang::ASTConsumer * ClangFunction::ASTTransformer (clang::ASTConsumer *passthrough) { - return new ASTStructExtractor(passthrough, m_wrapper_struct_name.c_str(), *this); + m_struct_extractor.reset(new ASTStructExtractor(passthrough, m_wrapper_struct_name.c_str(), *this)); + + return m_struct_extractor.get(); } |