brintos

brintos / llvm-project-archived public Read only

0
0
Text · 724 B · d9dd5cb Raw
23 lines · plain
1// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-10.7 -emit-llvm -o - %s | FileCheck %s2 3// Properly instantiate a non-dependent message expression which4// requires a contextual conversion to ObjC pointer type.5@interface Test06- (void) foo;7@end8namespace test0 {9  struct A {10    operator Test0*();11  };12  template <class T> void foo() {13    A a;14    [a foo];15  }16  template void foo<int>();17  // CHECK-LABEL:    define weak_odr void @_ZN5test03fooIiEEvv()18  // CHECK:      [[T0:%.*]] = call noundef ptr @_ZN5test01AcvP5Test0Ev(19  // CHECK-NEXT: [[T1:%.*]] = load ptr, ptr20  // CHECK-NEXT: call void @objc_msgSend(ptr noundef [[T0]], ptr noundef [[T1]])21  // CHECK-NEXT: ret void22}23