summaryrefslogtreecommitdiffstats
path: root/test/PCH/pragma-optimize.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/pragma-optimize.c')
-rw-r--r--test/PCH/pragma-optimize.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/PCH/pragma-optimize.c b/test/PCH/pragma-optimize.c
index 2206fe7..9570117 100644
--- a/test/PCH/pragma-optimize.c
+++ b/test/PCH/pragma-optimize.c
@@ -5,6 +5,12 @@
// RUN: %clang_cc1 %s -emit-pch -o %t
// RUN: %clang_cc1 %s -emit-llvm -include-pch %t -o - | FileCheck %s
+// The first run line creates a pch, and since at that point HEADER is not
+// defined, the only thing contained in the pch is the pragma. The second line
+// then includes that pch, so HEADER is defined and the actual code is compiled.
+// The check then makes sure that the pragma is in effect in the file that
+// includes the pch.
+
// expected-no-diagnostics
#ifndef HEADER
OpenPOWER on IntegriCloud