aboutsummaryrefslogtreecommitdiff
path: root/llvm/clang/test/Modules/implicit-opt-level.c
blob: f6f1f58d31d792bf8184b38f8db21fedcd010f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This test checks that under implicit modules, different optimization levels
// get different context hashes.

// RUN: rm -rf %t
// RUN: split-file %s %t

//--- module.modulemap
module M { header "M.h" }
//--- M.h
//--- tu.c
#include "M.h"

// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 -fsyntax-only %t/tu.c
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O1 -fsyntax-only %t/tu.c
// RUN: find %t/cache -name "M-*.pcm" | count 2