2010-08-05 17:48:08 +08:00
|
|
|
// Test this without pch.
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: not %clang_cc1 -include %S/pragma-weak.h %s -verify -emit-llvm -o - | FileCheck %s
|
2010-08-05 17:48:08 +08:00
|
|
|
|
|
|
|
// Test with pch.
|
|
|
|
// RUN: %clang_cc1 -x c-header -emit-pch -o %t %S/pragma-weak.h
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: not %clang_cc1 -include-pch %t %s -verify -emit-llvm -o - | FileCheck %s
|
2010-08-05 17:48:08 +08:00
|
|
|
|
|
|
|
// CHECK: @weakvar = weak global i32 0
|
|
|
|
int weakvar;
|
|
|
|
// expected-warning {{weak identifier 'undeclaredvar' never declared}}
|