Commit Graph

22 Commits

Author SHA1 Message Date
Karoy Lorentey
0d8f5d9113 [test] Interpreter/autolinking: Require local execution 2022-08-23 14:55:12 -07:00
Mishal Shah
272c466e47 Update master to build with Xcode 12 beta 2020-06-22 15:43:20 -07:00
Doug Gregor
3095deb0f1 [Tests] Update with explicit SDK linking where we missed it. 2020-06-18 09:48:19 -07:00
Lang Hames
7a0754b127 [Immediate] Switch immediate mode from MCJIT to LLJIT.
LLJIT is a simple LLVM IR JIT. Its interface is similar to MCJIT, but its
implementation is based on LLVM's newer ORC APIs. This initial patch does not
make use of any of LLJIT/ORC's advanced features, but will provide better
diagnostics when JIT'd code fails to link. Once LLJIT has proven usable in
this basic configuration we can start experimenting with more advanced
features, including lazy compilation.
2020-02-14 17:59:23 -08:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Jordan Rose
c1e4be1ad2 Catch llvm::report_fatal_error and try to emit a proper diagnostic. (#8639)
This only affects the textual output, but should still improve the
experience when we /do/ hit one of these LLVM errors. In addition to
showing up better in Xcode, it'll also give us a proper
PrettyStackTrace because of the call to abort() instead of exit(1).

(There's a bit of finger-crossing that the act of printing the
diagnostic doesn't cause more errors. I only tested the fallback
path a little.)
2017-04-10 10:40:03 -07:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
Andrew Trick
a18d490d6a Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3773)
* Migrate from `UnsafePointer<Void>` to `UnsafeRawPointer`.

As proposed in SE-0107: UnsafeRawPointer.

`void*` imports as `UnsafeMutableRawPointer`.
`const void*` imports as `UnsafeRawPointer`.

Occurrences of `UnsafePointer<Void>` are replaced with UnsafeRawPointer.

* Migrate overlays from UnsafePointer<Void> to UnsafeRawPointer.

This requires explicit memory binding in several places,
particularly in NSData and CoreAudio.

* Fix a bunch of test cases for Void->Raw migration.

* qsort takes IUO values

* Bridge `Unsafe[Mutable]RawPointer as `void [const] *`.

* Parse #dsohandle as UnsafeMutableRawPointer

* Update a bunch of test cases for Void->Raw migration.

* Trivial fix for the SceneKit test case.

* Add an UnsafeRawPointer self initializer.

This is unfortunately necessary for assignment between types imported from C.

* Tiny simplification of the initializer.
2016-07-26 14:21:15 -07:00
Andrew Trick
0ed9ee8dee Revert "Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)"
This reverts commit ece0951924.

This results in lldb failues on linux that I can't readily debug.
Backing out until they can be resolved.
2016-07-26 02:50:57 -07:00
Andrew Trick
ece0951924 Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)
* Migrate from `UnsafePointer<Void>` to `UnsafeRawPointer`.

As proposed in SE-0107: UnsafeRawPointer.

`void*` imports as `UnsafeMutableRawPointer`.
`const void*` imports as `UnsafeRawPointer`.

Occurrences of `UnsafePointer<Void>` are replaced with UnsafeRawPointer.

* Migrate overlays from UnsafePointer<Void> to UnsafeRawPointer.

This requires explicit memory binding in several places,
particularly in NSData and CoreAudio.

* Fix a bunch of test cases for Void->Raw migration.

* qsort takes IUO values

* Bridge `Unsafe[Mutable]RawPointer as `void [const] *`.

* Parse #dsohandle as UnsafeMutableRawPointer

* Update a bunch of test cases for Void->Raw migration.

* Trivial fix for the SceneKit test case.

* Add an UnsafeRawPointer self initializer.

This is unfortunately necessary for assignment between types imported from C.

* Tiny simplification of the initializer.
2016-07-26 02:18:21 -07:00
Michael Ilseman
e0414a457f [swift_newtype] Structs have label-less init
Adds an unlabeled rawValue init for swift_newtype(struct), which
expresses the extensibility theme better.  This makes the use and
creation of new instances of that type more succinct.
swift_newtype(enum) still requires the explicit label, as it is
non-extensible.
2016-05-23 14:40:41 -07:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Slava Pestov
377c1b9c64 lit.cfg: Set swift_interpreter on Linux since the 'swift' command works
This makes some previously-disabled tests pass on Linux.
2016-01-13 23:04:52 -07:00
Max Moiseev
f4aaece75e revisiting CString related String extensions 2015-12-17 17:27:29 -08:00
Joe Groff
fbd2e4d872 Rename @asmname to @_silgen_name.
This reflects the fact that the attribute's only for compiler-internal use, and isn't really equivalent to C's asm attribute, since it doesn't change the calling convention to be C-compatible.
2015-11-17 14:13:48 -08:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Jordan Rose
857e32d9f5 [test] Use %target-jit-run instead of %target-swift-frontend -interpret.
rdar://problem/20474905

Swift SVN r27174
2015-04-09 18:25:14 +00:00
Jordan Rose
e0d182845d [test] Changing autolinking-in-immediate-mode test to build its own library.
...rather than relying on libfunctionNameDemangle, which got renamed and
may disappear some day anyway.

Swift SVN r27042
2015-04-06 21:24:00 +00:00
Dmitri Hrybenko
321d4d4792 Rename libfunctionNameDemangle.dylib to libswiftDemangle.dylib
This library becomes a permanent interface that we would need to support
in the long term, so we should get dylib names and APIs right.

rdar://20418214

Swift SVN r26957
2015-04-03 22:12:28 +00:00
Jordan Rose
ccf0f2ad3e [test] Remove false comment about use of @asmname.
Nope, I'm just abusing @asmname to avoid having to write a seperate header.
Or bring in the real header. Sorry.

Swift SVN r26628
2015-03-27 16:36:33 +00:00
Jordan Rose
69dc123a9f Don't diagnose failing to load an autolinked library in immediate mode.
Otherwise, we can run into trouble when the SDK is out of sync with the
host OS.

rdar://problem/20274745

Swift SVN r26494
2015-03-24 18:44:55 +00:00