diff options
author | emaste <emaste@FreeBSD.org> | 2013-11-12 17:25:33 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2013-11-12 17:25:33 +0000 |
commit | 9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e (patch) | |
tree | b9aa1d1064fb25a0f2313d9a7964c862c0b7b354 /contrib/llvm/tools/lldb/source/Expression/ClangFunction.cpp | |
parent | 4372cfee12af5dfa890561beb0fecc90957ba058 (diff) | |
parent | c727fe695d28799acb499e9961f11ec07d4f9fe2 (diff) | |
download | FreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.zip FreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.tar.gz |
Update LLDB to upstream r194122 snapshot
ludes 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(); } |