例如,我有一个名为test.cpp的C ++文件:
#include <iostream>
int main(){
int a = 0;
int b = 1;
char c = '3';
cout<< a <<endl; // We want to get the binary code from here
cout<< b <<endl; // to here
cout<< c <<endl;
}
当我使用LLVM编译它时(我猜应该修改LLVM),如何获得上面注释中所述的二进制代码?
我是否需要插入额外的标志以将它们与其他标志区分开?
using namespace std;
,以便您的代码编译,然后再尝试g++ -S <your file here> -o result
。现在打开结果文件。