
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
24 lines
774 B
LLVM
24 lines
774 B
LLVM
; Test that nullary clang.arc.attachedcall operand bundles are "upgraded".
|
|
|
|
; RUN: llvm-dis %s.bc -o - | FileCheck %s
|
|
; RUN: verify-uselistorder %s.bc
|
|
|
|
define i8* @invalid() {
|
|
; CHECK-LABEL: define ptr @invalid() {
|
|
; CHECK-NEXT: %tmp0 = call ptr @foo(){{$}}
|
|
; CHECK-NEXT: ret ptr %tmp0
|
|
%tmp0 = call i8* @foo() [ "clang.arc.attachedcall"() ]
|
|
ret i8* %tmp0
|
|
}
|
|
|
|
define i8* @valid() {
|
|
; CHECK-LABEL: define ptr @valid() {
|
|
; CHECK-NEXT: %tmp0 = call ptr @foo() [ "clang.arc.attachedcall"(ptr @llvm.objc.retainAutoreleasedReturnValue) ]
|
|
; CHECK-NEXT: ret ptr %tmp0
|
|
%tmp0 = call i8* @foo() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
|
|
ret i8* %tmp0
|
|
}
|
|
|
|
declare i8* @foo()
|
|
declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
|