
This enabled opaque pointers by default in LLVM. The effect of this is twofold: * If IR that contains *neither* explicit ptr nor %T* types is passed to tools, we will now use opaque pointer mode, unless -opaque-pointers=0 has been explicitly passed. * Users of LLVM as a library will now default to opaque pointers. It is possible to opt-out by calling setOpaquePointers(false) on LLVMContext. A cmake option to toggle this default will not be provided. Frontends or other tools that want to (temporarily) keep using typed pointers should disable opaque pointers via LLVMContext. Differential Revision: https://reviews.llvm.org/D126689
25 lines
580 B
LLVM
25 lines
580 B
LLVM
; RUN: llvm-link %s %S/Inputs/alias-2.ll -S -o - | FileCheck %s
|
|
; RUN: llvm-link %S/Inputs/alias-2.ll %s -S -o - | FileCheck %s
|
|
|
|
; Test the fix for PR26152, where A from the second module is
|
|
; erroneously renamed to A.1 and not linked to the declaration from
|
|
; the first module
|
|
|
|
@C = alias void (), ptr @A
|
|
|
|
define void @D() {
|
|
call void @C()
|
|
ret void
|
|
}
|
|
|
|
define void @A() {
|
|
ret void
|
|
}
|
|
|
|
; CHECK-DAG: @C = alias void (), ptr @A
|
|
; CHECK-DAG: define void @B()
|
|
; CHECK-DAG: call void @A()
|
|
; CHECK-DAG: define void @D()
|
|
; CHECK-DAG: call void @C()
|
|
; CHECK-DAG: define void @A()
|