diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-07-27 00:55:47 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-07-27 00:55:47 +0000 |
| commit | 8ade104a0a10442b83347e21da001f0a26a73785 (patch) | |
| tree | 0894b3f7eee5ad6b9d3b0e0b28e90b39f5a092c4 /lldb/source/Expression/ClangASTSource.cpp | |
| parent | ce3a8293a0473078fa29178a00f2dc7945438572 (diff) | |
| download | bcm5719-llvm-8ade104a0a10442b83347e21da001f0a26a73785.tar.gz bcm5719-llvm-8ade104a0a10442b83347e21da001f0a26a73785.zip | |
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
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
| -rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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()); +} |

