blob: 18b45c889d12c9cf00b3595b463468812958b926 [file] [log] [blame]
Argyrios Kyrtzidis72b90572010-08-05 09:48:08 +00001// Test this without pch.
2// RUN: %clang_cc1 -include %S/pragma-weak.h %s -verify -emit-llvm -o - | FileCheck %s
3
4// Test with pch.
5// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak.h
6// RUN: %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
7
8// CHECK: @weakvar = weak global i32 0
9int weakvar;
10// expected-warning {{weak identifier 'undeclaredvar' never declared}}