brintos

brintos / llvm-project-archived public Read only

0
0
Text · 482 B · 32afe95 Raw
29 lines · cpp
1// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s2// pr84093 4// CHECK: @_ZN1CIiE11needs_guardE = linkonce_odr {{(dso_local )?}}global5// CHECK: @_ZGVN1CIiE11needs_guardE = linkonce_odr {{(dso_local )?}}global6 7struct K8{9  K();10  K(const K &);11  ~K();12  void PrintNumK();13};14 15template<typename T>16struct C17{18  void Go() { needs_guard.PrintNumK(); }19  static K needs_guard;20};21 22template<typename T> K C<T>::needs_guard;23 24void F()25{26  C<int>().Go();27}28 29