This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Implicit Modules] Add -cc1 option -fmodules-strict-context-hash whic…
…h includes search paths and diagnostics. Differential Revision: https://reviews.llvm.org/D68528 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375322 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
5 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// RUN: rm -rf %t | ||
// RUN: %clang_cc1 -fsyntax-only -internal-isystem \ | ||
// RUN: %S/Inputs/System/usr/include -fmodules -fimplicit-module-maps \ | ||
// RUN: -fmodules-cache-path=%t %s -Rmodule-build 2> %t1 | ||
// RUN: rm -rf %t | ||
// RUN: %clang_cc1 -fsyntax-only -internal-isystem \ | ||
// RUN: %S/Inputs/System/usr/include -internal-isystem %S -fmodules \ | ||
// RUN: -fimplicit-module-maps -fmodules-cache-path=%t %s -Rmodule-build 2> \ | ||
// RUN: %t2 | ||
// RUN: rm -rf %t | ||
// RUN: %clang_cc1 -fsyntax-only -internal-isystem \ | ||
// RUN: %S/Inputs/System/usr/include -internal-isystem %S -fmodules \ | ||
// RUN: -fimplicit-module-maps -fmodules-cache-path=%t %s \ | ||
// RUN: -fmodules-strict-context-hash -Rmodule-build 2> %t3 | ||
// RUN: rm -rf %t | ||
// RUN: %clang_cc1 -fsyntax-only -Weverything -internal-isystem \ | ||
// RUN: %S/Inputs/System/usr/include -fmodules -fmodules-strict-context-hash \ | ||
// RUN: -fimplicit-module-maps -fmodules-cache-path=%t %s -Rmodule-build 2> \ | ||
// RUN: %t4 | ||
// RUN: echo %t | cat - %t1 %t2 %t3 %t4 | FileCheck %s | ||
|
||
// This test verifies that only strict hashing includes search paths and | ||
// diagnostics in the module context hash. | ||
|
||
#include <stdio.h> | ||
|
||
// CHECK: [[PREFIX:(.*[/\\])+[a-zA-Z0-9.-]+]] | ||
// CHECK: building module 'cstd' as '[[PREFIX]]{{[/\\]}}[[CONTEXT_HASH:[A-Z0-9]+]]{{[/\\]}}cstd-[[AST_HASH:[A-Z0-9]+]].pcm' | ||
// CHECK: building module 'cstd' as '{{.*[/\\]}}[[CONTEXT_HASH]]{{[/\\]}}cstd-[[AST_HASH]].pcm' | ||
// CHECK-NOT: building module 'cstd' as '{{.*[/\\]}}[[CONTEXT_HASH]]{{[/\\]}} | ||
// CHECK: cstd-[[AST_HASH]].pcm' | ||
// CHECK-NOT: building module 'cstd' as '{{.*[/\\]}}[[CONTEXT_HASH]]{{[/\\]}} | ||
// CHECK: cstd-[[AST_HASH]].pcm' |