Home | History | Annotate | Download | only in dcl.link
      1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
      2 
      3 struct X { };
      4 
      5 // CHECK: @x1 = global %struct.X zeroinitializer
      6 // CHECK: @x4 = global %struct.X zeroinitializer
      7 // CHECK: @x2 = external global %struct.X
      8 // CHECK: @x3 = external global %struct.X
      9 extern "C" {
     10   X x1;
     11 }
     12 
     13 extern "C" X x2;
     14 
     15 extern X x3;
     16 
     17 X x4;
     18 
     19 X& get(int i) {
     20   if (i == 1)
     21     return x1;
     22   else if (i == 2)
     23     return x2;
     24   else if (i == 3)
     25     return x3;
     26   else
     27     return x4;
     28 }
     29