blob: 4a4819764025e7e0c5513e067d71f51ecb3a9d47 [file] [log] [blame]
Argyrios Kyrtzidisee1afa32010-08-05 09:48:08 +00001// Test this without pch.
Rafael Espindola925213b2013-07-04 16:16:58 +00002// RUN: not %clang_cc1 -include %S/pragma-weak.h %s -verify -emit-llvm -o - | FileCheck %s
Argyrios Kyrtzidisee1afa32010-08-05 09:48:08 +00003
4// Test with pch.
5// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak.h
Rafael Espindola925213b2013-07-04 16:16:58 +00006// RUN: not %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
Argyrios Kyrtzidisee1afa32010-08-05 09:48:08 +00007
Rafael Espindola922f2aa2018-02-23 19:30:48 +00008// CHECK: @weakvar = weak {{(dso_local )?}}global i32 0
Argyrios Kyrtzidisee1afa32010-08-05 09:48:08 +00009int weakvar;
10// expected-warning {{weak identifier 'undeclaredvar' never declared}}