[cfe-dev] how to properly initialize builtins for RecursiveASTVisitor
Peeter Joot
peeter.joot at gmail.com
Thu Dec 20 12:43:02 PST 2012
I've added the AddPath()'s for my system headers, but now get errors like:
.../bin/../lib/clang/3.3/include/stdarg.h:30:9: error: unknown type name
'__builtin_va_list'; did you mean '__builti
.../osse/core/inc/ossmath.h:48:11: error: use of undeclared identifier
'__builtin_sqrt'; did you mean '__builtin_
I'm guessing this is due to how I'm initializing the builtin context:
Builtin::Context builtinContext ;
builtinContext.InitializeTarget( *pTargetInfo ) ;
ASTContext * pASTcontext = new ASTContext( languageOptions,
sourceManager,
pTargetInfo,
identifierTable,
selectorTable,
builtinContext,
0 /* size_reserve*/ ) ;
I tried adding:
builtinContext.InitializeBuiltins( identifierTable, languageOptions )
;
before the ASTContext creation, but this doesn't appear to have an effect?
My Langopts now include:
languageOptions.GNUMode = 1 ;
languageOptions.CXXExceptions = 1 ;
languageOptions.RTTI = 1 ;
languageOptions.Bool = 1 ;
languageOptions.CPlusPlus = 1 ;
languageOptions.WChar = 1 ;
and I see that NoBuiltin is already 0 by default?
--
Peeter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121220/6224cd15/attachment.html>
More information about the cfe-dev
mailing list