Front-end: add an option to ignore .swiftsourceinfo file for testing purposes

We generate .swiftsourceinfo for stdlib in the build directory because ABI checker
could issue diagnostics to the stdlib source. However, this may also change other
diagnostic tests. Both Brent and Jordan have raised concern about this. After
adding this flag, other diagnostic tests could ignore .swiftsourceinfo files even
though when they are present so our tests will reflect what most users experience
when sources for stdlib are unavailable.
This commit is contained in:
Xi Ge
2019-10-15 10:41:32 -07:00
parent f8209f2865
commit 0a396ab38f
7 changed files with 46 additions and 24 deletions

View File

@@ -156,6 +156,9 @@ public:
/// Indicates that the input(s) should be parsed as the Swift stdlib.
bool ParseStdlib = false;
/// Ignore .swiftsourceinfo file when trying to get source locations from module imported decls.
bool IgnoreSwiftSourceInfo = false;
/// When true, emitted module files will always contain options for the
/// debugger to use. When unset, the options will only be present if the
/// module appears to not be a public module.