[LLVMdev] Another two questions on LLVM

Xiaolong Tang xiaolong.snake at gmail.com
Mon Jun 7 13:18:06 PDT 2010


Hello Sebastian, 

Thanks!

> It doesn't. Handling C++'s new expression (not statement) is up to the
> compiler frontend. Clang handles it by emitting a call to the
> runtime-provided operator new function (which is probably implemented in
> terms of malloc) followed by a constructor call, if applicable.

Just reminded me of the accurate C++ syntax grammar. The proper
description is new expressions rather than new statements.

> > Third, does LLVM provide any strategy to resolve function calls? If
> > yes, what strategies does it employ?
> >   
> What do you mean by resolve?

I mean to say the way to resolve virtual functions in C++. I am
currently experimenting to write an analysis pass in LLVM. One
prerequisite of the analysis is to have a safe approximation of a
program's run-time callgraph. Fortunately, Eli basically answered my
questions. 

Thanks all!

Best, 
Xiaolong



More information about the llvm-dev mailing list