Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
      2 // rdar: // 8562966
      3 // pr8409
      4 
      5 // CHECK: @_ZN1CIiE11needs_guardE = linkonce_odr global
      6 // CHECK: @_ZGVN1CIiE11needs_guardE = linkonce_odr global
      7 
      8 struct K
      9 {
     10   K();
     11   K(const K &);
     12   ~K();
     13   void PrintNumK();
     14 };
     15 
     16 template<typename T>
     17 struct C
     18 {
     19   void Go() { needs_guard.PrintNumK(); }
     20   static K needs_guard;
     21 };
     22 
     23 template<typename T> K C<T>::needs_guard;
     24 
     25 void F()
     26 {
     27   C<int>().Go();
     28 }
     29 
     30