mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
cc55b73867
Summary: getSubroutineName is currently only used by llvm-symbolizer, thus add a binary test containing a cross-cu inlining example. Reviewers: samsonov, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5394 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218245 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
441 B
C
19 lines
441 B
C
// To generate the test file:
|
|
// clang cross-cu-inlining.c -DA_C -g -emit-llvm -S -o a.ll
|
|
// clang cross-cu-inlining.c -DB_C -g -emit-llvm -S -o b.ll
|
|
// llvm-link a.ll b.ll -o ab.bc
|
|
// opt -inline ab.bc -o cross-cu-inlining.bc
|
|
// clang -c cross-cu-inlining.bc -o cross-cu-inlining.o
|
|
#ifdef A_C
|
|
int i;
|
|
int func(int);
|
|
int main() {
|
|
return func(i);
|
|
}
|
|
#endif
|
|
#ifdef B_C
|
|
int __attribute__((always_inline)) func(int x) {
|
|
return x * 2;
|
|
}
|
|
#endif
|