On Tue, Dec 31, 2013 at 3:48 AM, Saoni Mukherjee
<[email protected]> wrote:
> However if I print the AST of the program (clang -cc1 ast-dump program.c),
> it shows two functions, NOT the add inlined into main. Am I missing
> something?

Hello,

AST printer prints the AST as source code as closely to source as
possible.  Even more, Clang does not perform inlining on AST level, it
is performed on LLVM IR.

Also, please note that 'inline' is only an advice for the compiler,
not a hard requirement.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
cfe-users mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users

Reply via email to