Hello everyone:
I have known that when a file(for example: a.c) is compiled with -flto flag, llvm will output a bitcode file(a.o), command is (clang -flto -c a.c -o a.o). Then I compile same file to bitcode file a.bc, command is (clang -emit-llvm -o a.bc -c a.c). I want to know what difference between a.o and a.bc ?
a.c content is like below:
#include "a.h"
static signed int i = 0;
void foo2(void) {
i = -1;
}
static int foo3() {
foo4();
return 10;
}
int foo1(void) {
int data = 0;
if (i < 0)
data = foo3();
data = data + 42;
return data;
}
Thanks
lzx