Commit Graph

10 Commits

Author SHA1 Message Date
Doug Gregor
8cd2f34654 Generalize tests for both diagnostic styles, or force the LLVM style
These tests are using FileCheck to check the result of diagnostic
formatting in ways that don't match the new formatter. Force the old
formatter or, where possible, generalize so that they match both
formatters.
2024-02-19 02:48:37 -10:00
Artem Chikin
0445336adf Add location to the sema_no_import_target diagnostic
Thsi diagnostic currently emits, for example:
```
could not find module Foo for target arm64; found: x86_64
```
It is sometimes very useful to know where exactly the `found` module is located, so this PR changes this diagnostic to emit:
```
could not find module Foo for target arm64; found: x86_64, at:
<Path where Foo.swiftmodule/x86_64.swiftmodule is located>
```
2021-04-13 11:02:58 -07:00
Erik Eckstein
78ec15cf38 tests: remove some unused FileCheck prefix options
Such tests would fail with the -allow-unused-prefixes FileCheck option.

diff --git a/test/lit.cfg b/test/lit.cfg
-run_filecheck = '%s %s --sanitize BUILD_DIR=%s --sanitize SOURCE_DIR=%s --use-filecheck %s %s' % (
+run_filecheck = '%s %s --sanitize BUILD_DIR=%s --sanitize SOURCE_DIR=%s --use-filecheck %s %s -allow-unused-prefixes=false' % (

It helps avoiding some wrong CHECK patterns.
I just looked briefly at some of the fails. TODO: fix remaining tests, too.

rdar://74189761
2021-03-25 15:19:30 +01:00
Varun Gandhi
a1716fe2a6 [Diagnostics] Update compiler diagnostics to use less jargon. (#31315)
Fixes rdar://problem/62375243.
2020-04-28 14:11:39 -07:00
Brent Royal-Gordon
3f58a79174 Import error now mentions the target, not the arch 2019-02-27 11:43:12 -08:00
Brent Royal-Gordon
c1cc51d1f3 Use target triple for “universal” modules
When loading a module supporting multiple targets, the module loader now looks for a file named with a normalized version of the target triple first, and only falls back to the architecture name if the normalized triple is not found.
2019-02-27 11:43:12 -08:00
Saleem Abdulrasool
d4ea98436b test: port Serialization tests to Windows
These changes enable the serialization test suite to pass on Windows.
2018-12-30 15:19:03 -08:00
Jordan Rose
6c68ac22f9 [Serialization] Only diagnose a bad architecture when there are others (#20550)
This diagnostic needs to be adapted for swiftinterfaces too, but
meanwhile let's not have it get in the way when dealing with a
multi-architecture module that has parseable interfaces.

    MyKit.framework/
      Modules/
        MyKit.swiftmodule/
          x86_64.swiftinterface
          x86_64.swiftdoc
          # no x86_64.swiftmodule
2018-11-13 18:11:01 -08:00
Jordan Rose
b5abea39e3 [test] Fix load-invalid-arch.swift to use the "major" architecture (#17342)
armv7, armv7s, and armv7k all get encoded as "arm" in today's scheme
for swiftmodules, so we can't just use the CPU part of the triple as
the expected swiftmodule architecture in the diagnostic.
2018-06-19 19:23:44 -07:00
Tapan Thaker
359385babf Print proper error message when the swiftmodule for architecture not found (#17092)
https://bugs.swift.org/browse/SR-7160
2018-06-18 17:41:24 -07:00