Commit Graph

14 Commits

Author SHA1 Message Date
Alexis Laferrière
205a2edf38 [Sema] Intro set of import filters for general use
Calling getImportedModules requires to list the desired kind of imports.
With the new kind of imports this has become cumbersome. Let's simplify
it by offering common sets of imports. Advanced call sites can still
list the desired imports explicitly.
2023-03-17 16:05:44 -07:00
Richard Wei
c6139f2f78 [Macros] Emit loaded module trace for plugins loaded from search paths
When loading plugins from `-plugin-path`, use the global `PluginRegistry` to keep a record of what's loaded. Emit these dependencies to the loaded module trace.
2023-03-06 02:19:56 -08:00
Alexis Laferrière
6980cf211b [Serialization] Intro package-only module wide information and serialize it 2023-03-03 11:43:20 -08:00
Alexis Laferrière
4330921806 [Sema] Remove ImportFilterKind::SPIAccessControl
That filter wasn't needed in practice, we can remove it.
2023-03-03 11:42:59 -08:00
Richard Wei
4480d89536 [Macros] Emit plugin dependencies to loaded module trace. (#63367)
Emit plugins loaded with `-load-plugin-library` to loaded module trace.

Resolves rdar://102212316.
2023-02-03 09:16:14 +08:00
Doug Gregor
aa969c7ccb [Module trace] Eliminate use of report_fatal_error in non-assertions builds
This code path can have its invariants broken by catastrophic build
failures and needs to not crash.
2022-12-22 09:47:47 -08:00
Anthony Latsis
2843e0c871 Gardening: Migrate compiler sources to GitHub issues 2022-09-29 23:58:55 +03:00
Ben Barham
c676dfc2fa [rebranch] Update uses of ErrorHandling.h functions
llvm-project `ErrorHandling.h` was updated to remove std::string. This
added a new `report_fatal_error` overload taking a `const Twine &`,
removed the overload that took `const std::string &`, and updated
`fatal_error_handler_t` to use `const char *` rather than `const
std::string &`.

Fix uses of these functions to take into account these updates. Note
that without the `const std::string &` overload, passing a `std::string`
into `report_fatal_error` now results in an ambiguous match between the
`StringRef` and `Twine` overloads so we need to be explicit about one or
the other.
2021-11-13 15:33:09 +10:00
Artem Chikin
2905433c6f Emit module trace atomically.
Ensure that we only have one writer to the module trace file at a time by using LLVM's `LockFileManager` utilities, similarly to `ModuleInterfaceBuilder`

Resolves rdar://76743462
2021-10-26 14:59:12 -07:00
Evan Wilde
8112cda531 Updated F_Text and F_Append
These enum cases were also updated to OF_Text and OF_Append.
2021-06-23 14:29:52 -07:00
Robert Widmann
d946df7895 Include Incremental Dependencies in Module Trace 2021-03-02 12:52:52 -08:00
Robert Widmann
76d25e7097 [NFC] Fixup InputFile Convenience Getters
Follow programming guidelines for these getters more closely and have them return a non-owning view of the underlying data instead of relying on callers to take const references to the copy that is returned here.
2020-11-12 14:54:02 -08:00
Robert Widmann
19e6bee374 [NFC] Use the Correct const-Qualification in Dependency Code
T *const does not prevent logically non-const accesses to the underlying data, it merely indicates that the pointer value itself is const. This modifier can be cast off by a copy, so it's not generally what you want here. Switch to const T * instead.
2020-11-12 10:57:56 -08:00
Robert Widmann
17143cb9c3 [NFC] Split ModuleTrace Infrastructure out of FrontendTool 2020-11-11 14:32:44 -08:00