mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 04:16:09 +00:00

Always read bitcode according to the -opaque-pointers mode. Do not perform auto-detection to implicitly switch to typed pointers. This is a step towards removing typed pointer support, and also eliminates the class of problems where linking may fail if a typed pointer module is loaded before an opaque pointer module. (The latest place where this was encountered is D139924, but this has previously been fixed in other places doing bitcode linking as well.) Differential Revision: https://reviews.llvm.org/D139940
23 lines
638 B
LLVM
23 lines
638 B
LLVM
; 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: @baz = alias i32, ptr @bar
|
|
|
|
;BCAN: <SOURCE_FILENAME
|
|
;BCAN-NEXT: <GLOBALVAR {{.*}} op7=0/>
|
|
;BCAN-NEXT: <FUNCTION {{.*}} op16=0/>
|
|
;BCAN-NEXT: <ALIAS {{.*}} op9=0/>
|