From 8ade104a0a10442b83347e21da001f0a26a73785 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Tue, 27 Jul 2010 00:55:47 +0000 Subject: Changed SymbolContext so when you search for functions it returns a list of functions as a SymbolContextList. Rewrote the clients of SymbolContext to use this SymbolContextList. Rewrote some of the providers of the data to SymbolContext to make them respect preferences as to whether the list should be cleared first; propagated that change out. ClangExpressionDeclMap and ClangASTSource use this new function list to properly generate function definitions - even for functions that don't have a prototype in the debug information. llvm-svn: 109476 --- lldb/source/Expression/ClangASTSource.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lldb/source/Expression/ClangASTSource.cpp') diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 2ea2bce1e1f..3f83acf4b8a 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -146,3 +146,19 @@ clang::NamedDecl *NameSearchContext::AddFunDecl(void *type) { return Decl; } + +clang::NamedDecl *NameSearchContext::AddGenericFunDecl() +{ + QualType generic_function_type(ASTSource.Context.getFunctionType(ASTSource.Context.getSizeType(), // result + NULL, // argument types + 0, // number of arguments + true, // variadic? + 0, // type qualifiers + false, // has exception specification? + false, // has any exception specification? + 0, // number of exceptions + NULL, // exceptions + FunctionType::ExtInfo())); // defaults for noreturn, regparm, calling convention + + return AddFunDecl(generic_function_type.getAsOpaquePtr()); +} -- cgit v1.2.3