diff options
| author | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-03 21:45:55 +0000 |
|---|---|---|
| committer | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-03 21:45:55 +0000 |
| commit | 36528c2a9b3d37d6692de5738697598abfb5d9c8 (patch) | |
| tree | 2729d6a8bd507a1de66862d7869fb4ef8ade7868 /llvm/test/Bitcode/thinlto-summary-local-5.0.ll | |
| parent | 3fc9188fa8cb939539e568a0ef602892aa3fc59a (diff) | |
| download | bcm5719-llvm-36528c2a9b3d37d6692de5738697598abfb5d9c8.tar.gz bcm5719-llvm-36528c2a9b3d37d6692de5738697598abfb5d9c8.zip | |
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol
resolutions that the linker plugin provides as part of lto/thinlto link
step to refine the compilers view on what symbols will end up being local.
Differential Revision: https://reviews.llvm.org/D35702
llvm-svn: 317374
Diffstat (limited to 'llvm/test/Bitcode/thinlto-summary-local-5.0.ll')
| -rw-r--r-- | llvm/test/Bitcode/thinlto-summary-local-5.0.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/thinlto-summary-local-5.0.ll b/llvm/test/Bitcode/thinlto-summary-local-5.0.ll new file mode 100644 index 00000000000..cbc48d23df3 --- /dev/null +++ b/llvm/test/Bitcode/thinlto-summary-local-5.0.ll @@ -0,0 +1,22 @@ +; Bitcode compatibility test for dso_local flag in thin-lto summaries. +; Checks that older bitcode summaries without the dso_local op are still +; properly parsed and don't set GlobalValues as dso_local. + +; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: llvm-bcanalyzer -dump %s.bc | FileCheck %s --check-prefix=BCAN + +define void @foo() { +;CHECK-DAG:define void @foo() + ret void +} + +@bar = global i32 0 +;CHECK-DAG: @bar = global i32 0 + +@baz = alias i32, i32* @bar +;CHECK-DAG: @bar = global i32 0 + +;BCAN: <SOURCE_FILENAME +;BCAN-NEXT: <GLOBALVAR {{.*}} op7=0/> +;BCAN-NEXT: <FUNCTION {{.*}} op16=0/> +;BCAN-NEXT: <ALIAS {{.*}} op9=0/> |

