Skip to content

Commit eb84b7d

Browse files
compnerdjrose-apple
authored andcommitted
ClangImporter: reorganise the options (#3005)
Reorganise the options to be grouped together by purpose. NFC.
1 parent 7ffba21 commit eb84b7d

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -316,22 +316,25 @@ getNormalInvocationArguments(std::vector<std::string> &invocationArgStrs,
316316

317317
// Construct the invocation arguments for the current target.
318318
// Add target-independent options first.
319-
invocationArgStrs.insert(invocationArgStrs.end(), {
320-
// Enable modules.
321-
"-fmodules",
319+
invocationArgStrs.insert(
320+
invocationArgStrs.end(),
321+
{
322322

323-
// Enable implicit module maps (this option is implied by "-fmodules").
324-
"-fimplicit-module-maps",
323+
// Enable modules
324+
"-fmodules",
325+
"-fmodules-validate-system-headers",
326+
"-Werror=non-modular-include-in-framework-module",
327+
// Enable implicit module maps (implied by "-fmodules")
328+
"-fimplicit-module-maps",
329+
"-Xclang", "-fmodule-feature", "-Xclang", "swift",
325330

326-
// Don't emit LLVM IR.
327-
"-fsyntax-only",
331+
// Don't emit LLVM IR.
332+
"-fsyntax-only",
328333

329-
SHIMS_INCLUDE_FLAG, searchPathOpts.RuntimeResourcePath,
330-
"-fretain-comments-from-system-headers",
331-
"-fmodules-validate-system-headers",
332-
"-Werror=non-modular-include-in-framework-module",
333-
"-Xclang", "-fmodule-feature", "-Xclang", "swift",
334-
});
334+
"-fretain-comments-from-system-headers",
335+
336+
SHIMS_INCLUDE_FLAG, searchPathOpts.RuntimeResourcePath,
337+
});
335338

336339
// Set C language options.
337340
if (triple.isOSDarwin()) {

0 commit comments

Comments
 (0)