我有这样的场景:
int open_ext2 () {}
int close_ext2 () {}
int read_ext2 () {}
int write_ext2 () {}
const struct fs_callbacks FS = {
open_file: open_ext2,
close_file: close_ext2,
read_bytes: read_ext2,
write_bytes: write_ext2
};
void main(){
FS.close_file();
}
当我查看 gimple 表示(用 编译-fdump-tree-all
)时,我看到如下内容:
D.1796 = close_ext2;
D.1796 ();
我没有得到的是任务发生在哪里open_file: open_ext2
我的问题
- GCC 是如何做到这一点的?
- 它发生在什么阶段?
- 有没有办法找出映射标签-> 成员函数?