我已经使用Clang编译一个启用了调试信息的函数。对于Instruction s有方便的getDebugLoc(),但对于Function s没有这样的事情。鉴于一个Function实例,我怎么能得到调试信息(我猜在DISubProgram窗体)呢? 我见过the guide entry explaining how that debug information is represented,元数
我想从两个基本的C++函数(如下所示)中生成LLVM IR代码。 int newFun2(int x){
int z = x + x;
return z;
}
int newFun(int *y){
int first = y[3]; //How to define it using the LLVM API?
int num = newFun2(fi