Commit Graph

31 Commits

Author SHA1 Message Date
Arnold Schwaighofer
b30bd40b83 Add code to create llvm::RemarkStreamer objects for all the LLVMModules in WMO mode
rdar://154403078
2025-07-01 07:19:33 -07:00
Anthony Latsis
b0b0cff317 [NFC][test] Move scattered DiagnosticVerifier tests into subdirectory 2025-05-07 02:34:46 +01:00
Tony Allevato
9d3bcca73f Ensure that top-level macro expansions are in the JSON AST dump. 2025-01-30 12:18:21 -05:00
Tony Allevato
a15fddc4c0 Fix the macro test to use its own macro instead of relying on DebugDescription. 2025-01-29 08:23:39 -05:00
Antonio Frighetto
377c03fa7e [Driver][Frontend] Introduce load-pass-plugin option
Allow dynamic loading of LLVM passes via `load-pass-plugin`
option passed to the Swift compiler driver.
2024-11-07 17:25:24 +01:00
Becca Royal-Gordon
fd84e7273d Rename module.map -> module.modulemap in tests
The legacy `module.map` spelling of module map files was deprecated by llvm/llvm-project#75142 and clang expects to remove support for them in the future. Switch all tests to use the supported spelling.

Fixes rdar://128431478.
2024-08-12 17:47:26 -07:00
Butta
a240752487 [test] Fix test that's failing on the Android CI since string processing was enabled by default
Also, move the test to test/Frontend/ where it belongs and disable implicit
concurrency import too.
2022-06-23 01:27:14 +05:30
Ellie Shin
c08e7b9cd2 Module aliasing: modify ImportPath getters to return real module names
Resolves rdar://83632921, rdar://83633109
2021-11-10 00:30:25 -08:00
elsh
58a01c4ee7 Use StringMap
More specific diag msgs
Add tests
2021-09-24 14:37:56 -07:00
Alex Hoppen
e8c6ac0d72 [Frontend] Add test that we can create a module if same filename is used twice and -experimental-allow-module-with-compiler-errors is passed 2021-05-19 22:25:49 +02:00
Martin Boehme
f51f632c43 Use "not" instead of "set +o pipefail"; improve "broken" header.
A header shouldn't contain a function body unless the function is
inline. Following gribozavr's suggestion, I'm using the easier solution
of omitting the semicolon from the function prototype.

(In response to review comments.)
2020-03-02 14:56:42 +01:00
Martin Boehme
ca9df83fef Add tests for -verify mode. 2020-03-02 14:56:42 +01:00
David Ungar
fb2e0e7d13 Add class, enum, protocol tests for type-fingerprints and put in separate directory 2020-02-29 10:52:20 -08:00
David Ungar
d09c906553 Fix overly conservative fingerprint bug & fix tests. 2020-02-27 23:38:03 -08:00
David Ungar
d61f6f2f66 Changes to support per-type-body fingerprints. 2020-01-27 15:14:46 -08:00
Jonas Devlieghere
5c5041235b Merge Swift & Clang VFS in the ClangImporter
The clang importer has to deal with two virtual file systems, one coming
from clang, and one coming from swift. Currently, if both are set, we
emit a diagnostic that we'll pick the swift one.

This commit changes that, by merging the two virtual file systems. The
motivation for this change is the reproducer infrastructure in LLDB,
which adds a third virtual file system to the mix.

(cherry picked from commit 94ef5431ff)
2019-08-19 16:53:03 -07:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Robert Widmann
445399961d Diagnose missing and invalid vfs overlay files 2018-07-31 13:16:14 -07:00
Robert Widmann
0e58b7fd14 Plumbing for a Virtual File System
Adds the -vfsoverlay frontend option that enables the user to pass
VFS overlay YAML files to Swift. These files define a (potentially
many-layered) virtual mapping on which we predicate a VFS.

Switch all input-based memory buffer reads in the Frontend to the new
FileSystem-based approach.
2018-07-31 13:16:14 -07:00
Jordan Rose
d176bfa9ce [test] Move tests that only test the Frontend out of Driver/
Reorganization only.
2018-07-19 15:56:55 -07:00
Jordan Rose
b88256e7ac [test] Split out the Frontend parts of test/Driver/options.swift
This dates back to the early days when the Driver was still being
brought up, but there's no reason to put them together now.

Reorganization and elimination of redundancy only.
2018-07-19 15:56:55 -07:00
Slava Pestov
e1f50b2d36 SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline 2018-03-30 21:55:30 -07:00
David Ungar
3376ca741d Add frontend check to ensure that all primaries are present in the supplementary output filemap. 2018-03-22 14:57:27 -07:00
Erik Eckstein
cd3d50a5d9 ABI: Change the mangling prefix from _T0 to $S 2018-01-06 13:55:59 -08:00
Slava Pestov
00d5b45733 Frontend: Add a new -sil-merge-partial-modules flag
Previously we would drop all serialized SIL from partial swiftmodule
files generated while compiling source in non-WMO mode; all that was
missing was linking it in.

This adds a frontend flag, and a test; driver change is coming up
next.

Progress on <rdar://problem/18913977>.
2017-04-03 21:28:40 -07:00
Erik Eckstein
2a55b26e46 Mangling: enable new mangling for symbols 2017-03-16 12:04:08 -07:00
Jordan Rose
ad945426a0 Teach the frontend about -filelist for input files.
With this, we're out of the business of passing large numbers of input
files on the command line to the frontend, which means we no longer
overflow argv with a mere 1100 input files under whole-module optimization.

In order to make sure this doesn't happen again, I'd like to also get
this working for
- swiftmodule inputs to the merge-module build phase
- /output/ files for multithreading single-frontend builds (WMO)
- object file inputs to the linker on OS X (response files for binutils
  ld have different quoting rules)

Part 3 of https://bugs.swift.org/browse/SR-280.
2016-01-12 19:20:50 -08:00
Joe Groff
0cd5aa8c7c Change mangling for the Swift module from 'Ss' to 's'.
'Ss' appears in manglings tens of thousands of times in the standard library and is also incredibly frequent in other modules. This alone is enough to shrink the standard library by 59KB.

Swift SVN r32409
2015-10-02 22:39:44 +00:00
Luqman Aden
ce4bff5645 Frontend: Allow passing .sil as -primary-file along with other .sib as input.
Swift SVN r27612
2015-04-22 22:53:18 +00:00
Jordan Rose
770a3dda3b Fix memory-smashing logic error in dependency file generation.
Accessed the wrong array...

Swift SVN r18535
2014-05-21 23:33:51 +00:00
Jordan Rose
2877bd0854 Add support for dependency file generation with -emit-dependencies.
This performs very conservative dependency generation for each compile task
within a full compilation. Any source file, swiftmodule, or Objective-C
header file that is /touched/ gets added to the dependencies list, which
is written out on a per-input basis at the end of compilation.

This does /not/ handle dependencies for the aggregated swiftmodule, swiftdoc,
generated header, or linked binary. This is just the minimum needed to get
Xcode to recognize what needs to be rebuilt when a header or Swift source
file changes. We can revisit this later.

This finishes <rdar://problem/14899639> for now.

Swift SVN r18045
2014-05-14 00:34:11 +00:00