summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangASTSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp16
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());
+}
OpenPOWER on IntegriCloud