Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Frontend] Add flag to allow PCM generation despite compiler errors
As with precompiled headers, it's useful for indexers to be able to continue through compiler errors in dependent modules. Resolves rdar://69816264 Reviewed By: akyrtzi Differential Revision: https://reviews.llvm.org/D91580
- Loading branch information
Showing
13 changed files
with
62 additions
and
10 deletions.
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
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,8 @@ | ||
@import undefined | ||
|
||
@interface Error | ||
- (int)method; | ||
undefined | ||
@end | ||
|
||
undefined |
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 |
---|---|---|
|
@@ -483,3 +483,4 @@ module template_nontrivial1 { | |
header "template-nontrivial1.h" | ||
export * | ||
} | ||
module error { header "error.h" } |
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,25 @@ | ||
// RUN: rm -rf %t | ||
// RUN: mkdir %t | ||
|
||
// Write out a module with errors make sure it can be read | ||
// RUN: %clang_cc1 -fmodules -fallow-pcm-with-compiler-errors \ | ||
// RUN: -fmodules-cache-path=%t -x objective-c -emit-module \ | ||
// RUN: -fmodule-name=error %S/Inputs/module.map | ||
// RUN: %clang_cc1 -fmodules -fallow-pcm-with-compiler-errors \ | ||
// RUN: -fmodules-cache-path=%t -x objective-c -I %S/Inputs \ | ||
// RUN: -fimplicit-module-maps -ast-print %s | FileCheck %s | ||
|
||
// allow-pcm-with-compiler-errors should also allow errors in PCH | ||
// RUN: %clang_cc1 -fallow-pcm-with-compiler-errors -x c++ -emit-pch \ | ||
// RUN: -o %t/check.pch %S/Inputs/error.h | ||
|
||
@import error; | ||
|
||
void test(id x) { | ||
[x method]; | ||
} | ||
|
||
// CHECK: @interface Error | ||
// CHECK-NEXT: - (int)method; | ||
// CHECK-NEXT: @end | ||
// CHECK: void test(id x) |
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