Commit Graph

22 Commits

Author SHA1 Message Date
Saleem Abdulrasool
00122c8108 test: adjust path separator for tests
LLVM improved path canonicalisation in the rebranch.  Adjust the path
separator matching to allow the test to pass.
2023-01-13 12:55:39 -08:00
Adrian Prantl
38467355cf Update testcases on rebranch.
rdar://102151684
2022-12-21 15:08:15 -08:00
Adrian Prantl
0946844cbe Revert "tests: temporarily disable DebugInfo tests which are failing in rebranch"
This reverts commit f4254438a2.
2022-12-21 12:32:45 -08:00
Erik Eckstein
f4254438a2 tests: temporarily disable DebugInfo tests which are failing in rebranch
rdar://102151684
2022-12-01 15:26:27 +01:00
Saleem Abdulrasool
2af7c103a3 DebugInfo: deal with absolute path on Windows
Windows absolute paths are either UNC paths (begin with \\) or are
rooted with a drive letter.  Unfortunately, we cannot conditionalise the
path itself on the OS type.  On Unices // indicates the alternate root
path as per POSIX.  However, Linux does not implement this and // is
treated as /.  Use this to create a path that appears to be absolute on
all the targets.
2019-03-26 11:16:56 -07:00
adrian-prantl
70140a2d0a Merge pull request #22392 from adrian-prantl/DIFiles
Bring the Swift frontend's handling of DIFiles in synch with CFE.
2019-02-14 19:34:40 -08:00
Adrian Prantl
21f2c3d35b Bring the Swift frontend's handling of DIFiles in synch with CFE.
This applies the same changes from Clang CFE r349065 to the Swift
frontend to unify how filenames, cmpilation directories and absolute
paths in filenames and path remappings are handled.
2019-02-06 09:00:32 -08:00
Saleem Abdulrasool
4a2f7c9192 test: correct paths in DebugInfo/line-directive (NFC)
Adjust the test for Windows path separator.
2019-02-05 15:39:25 -08: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
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Chris Lattner
4992474168 Add support for #sourceLocation in its ratified forms. Switch gyb to produce
the new form.  This keeps accepting #setline for now, but we should rip it out
at some point.
2016-03-11 22:21:42 -08:00
Daniel Duan
fbac1335c0 [parser] update tests to use #setline 2016-03-01 16:33:23 -08:00
Dmitri Hrybenko
0fce5c7b4e tests: remove uses of println() that are not relevant to the tests
Swift SVN r28016
2015-05-01 03:35:50 +00:00
Adrian Prantl
a100a3e6e9 Debug Info: Don't absolutize file paths.
Fixes <rdar://problem/19985842> REPL should set the default file to "repl.swift"

Swift SVN r26022
2015-03-12 02:56:49 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Erik Eckstein
e59c4b6eb7 Add -primary-file options to prevent whole-module-optimizations.
This is needed for tests which define internal functions which should not be eliminated.

So far this was not needed because of a hack which prevented whole-module-optimizations for tests.



Swift SVN r22658
2014-10-10 09:51:48 +00:00
Jordan Rose
29f8c25d63 Move #line state into the Parser and out of the SourceManager.
As part of this change, allow #line directives to extend to the end of the
file, rather than requiring a reset.

Note that #line regions that start or end within function bodies will not
behave correctly when in delayed parsing modes. This was true before and
after this commit. (#line regions contained entirely within a function and
not within any other #line regions should be fine.)

Swift SVN r20571
2014-07-25 23:01:43 +00:00
Ted Kremenek
d075f06573 Require a minimum deployment target of iOS 7 or OSX 10.9
Implements <rdar://problem/17532113>

Swift SVN r19451
2014-07-02 06:23:38 +00:00
Adrian Prantl
400f1774e9 Add support for a #line directive.
This patch extends the syntax with a new #line directive that is inspired
by the homonymous CPP directive. It can be specified in all locations a #if
is legal (Stmt, Decl).

Semantics
---------

#line 42 "file.swift"
This makes diagnostics and debug information behave as if the subsequent
lines came from file.swift+42.

#line // without arguments
This switches back to the main source file and the switches back to the
normal line numbering. Any previous #line directives will result in gaps
in the main file.

Rationale
---------

LLDB and the REPL need this for making expressions that are entered into
the expression evaluator or REPL debugable. For more info see
<rdar://problem/17441710> Need #line directive or something similar so we can enhance the debugging of expressions and REPL

Also, I believe the stdlib would benefit from this and it would allow us
to get rid of the line-directive wrapper script.

Swift SVN r19384
2014-06-30 23:50:11 +00:00