Commit Graph

12 Commits

Author SHA1 Message Date
Robert Widmann
18b79ffcfd Resolve a Layering Violation in libBasic
Basic should not be allowed to link Parse, yet it was doing so
to allow Version to provide a constructor that would conveniently
parse a StringRef. This entrypoint also emitted diagnostics, so it
pulled in libAST.

Sink the version parser entrypoint down into Parse where it belongs
and point all the clients to the right place.
2022-09-09 00:21:30 -07:00
Ben Barham
6de34f37e5 [NFC] Revert SmallVector<T> -> SmallVector<T, N> fixes
With the change to include `SmallVector.h` directly in `LLVM.h` rather
than forward declaring in the only case it matters (ie. Clang <= 5),
these fixes are no longer needed. Since defaulted version is preferred
when there's no better choice (which is presumably the case if that's
how they were originally added), use it instead. Some uses were instead
changed to add `llvm::` so remove that too.
2022-08-05 21:25:55 -07:00
QuietMisdreavus
66b341f2a5 allow swift-symbolgraph-extract to be called on non-swift modules (#42399)
rdar://90842354
2022-04-19 09:56:40 -06:00
Ben Barham
e52ccf4c0d [SymbolGraph] Initialize newly added IncludeClangDocs field
This was added recently but not initialized in symbolgraph-extract.
We never output Clang imported symbols from this tool, so always passing
false is fine for now.
2022-04-14 13:14:03 -07:00
swift-ci
7ff906d730 Merge remote-tracking branch 'origin/main' into rebranch 2021-12-14 04:53:37 -08:00
Alex Hoppen
63c31033fc [Frontend] Load standard libarary in CompilerInstance::setup
Instead of checking that the stdlib can be loaded in a variety of places, check it when setting up the compiler instance. This required a couple more checks to avoid loading the stdlib in cases where it’s not needed.

To be able to differentiate stdlib loading failures from other setup errors, make `CompilerInstance::setup` return an error message on failure via an inout parameter. Consume that error on the call side, replacing a previous, more generic error message, adding error handling where appropriate or ignoring the error message, depending on the context.
2021-12-13 15:32:08 +01:00
Ben Barham
624337148b [NFC] Formatting cleanup to help with next conflicts 2021-10-15 17:15:51 +10:00
Evan Wilde
3876dbd610 Add number of elements to overlays
This patch adds a number of stack elements to the number of overlays in
the swift_symbolgraph_extract tool. We don't get the defaults from the
llvm type on Linux so it needs to be manually specified.

I never saw the number of overlays go above zero when dumping while
running the test suite, so I don't know what a "reasonable" number looks
like here. 8 seemed like a good number at the time.
2021-08-09 14:22:55 -07:00
Arnold Schwaighofer
a202c8fc72 Fix swift_symbolgraph_extract_main.cpp SmallVector 2021-08-05 12:15:23 -07:00
swift-ci
97cfa6b6f8 Merge remote-tracking branch 'origin/main' into rebranch 2021-07-13 13:52:43 -07:00
swift_jenkins
44619915b7 Merge remote-tracking branch 'origin/main' into next 2021-07-13 13:41:43 -07:00
Xi Ge
515cf21ba3 driver: refactor driver tool logics into a library. NFC 2021-07-13 10:03:12 -07:00