From 5a2575abd5a0156faeae20646802b411b7ce3096 Mon Sep 17 00:00:00 2001 From: Aleksandr Urakov Date: Wed, 26 Sep 2018 09:03:34 +0000 Subject: [PDB] Restore the calling convention from PDB Summary: This patch implements restoring of the calling convention from PDB. It is necessary for expressions evaluation, if we want to call a function of the debuggee process with a calling convention other than ccall. Reviewers: clayborg, zturner, labath, asmith Reviewed By: clayborg Subscribers: teemperor, lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D52501 --- lldb/source/Symbol/ClangASTContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/source/Symbol/ClangASTContext.cpp') diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 23e94884e37..fe47f29f18b 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -2058,7 +2058,8 @@ FunctionDecl *ClangASTContext::CreateFunctionDeclaration( CompilerType ClangASTContext::CreateFunctionType( ASTContext *ast, const CompilerType &result_type, const CompilerType *args, - unsigned num_args, bool is_variadic, unsigned type_quals) { + unsigned num_args, bool is_variadic, unsigned type_quals, + clang::CallingConv cc) { if (ast == nullptr) return CompilerType(); // invalid AST @@ -2086,6 +2087,7 @@ CompilerType ClangASTContext::CreateFunctionType( // TODO: Detect calling convention in DWARF? FunctionProtoType::ExtProtoInfo proto_info; + proto_info.ExtInfo = cc; proto_info.Variadic = is_variadic; proto_info.ExceptionSpec = EST_None; proto_info.TypeQuals = type_quals; -- cgit v1.2.3