forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'd83ae228657c' from swift/release/6.0 into stable/20230725
- Loading branch information
Showing
5 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SWIFT_SOURCES := main.swift | ||
SWIFTFLAGS_EXTRAS := -parse-as-library | ||
include Makefile.rules |
15 changes: 15 additions & 0 deletions
15
lldb/test/API/lang/swift/array_uninitialized/TestSwiftArrayUninitialized.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import lldb | ||
from lldbsuite.test.decorators import * | ||
import lldbsuite.test.lldbtest as lldbtest | ||
import lldbsuite.test.lldbutil as lldbutil | ||
|
||
|
||
class TestSwiftArrayUninitialized(lldbtest.TestBase): | ||
@swiftTest | ||
def test(self): | ||
"""Test unitialized global arrays""" | ||
self.build() | ||
lldbutil.run_to_source_breakpoint( | ||
self, 'break here', lldb.SBFileSpec('main.swift')) | ||
self.expect("target variable -- array_unused", substrs=['<uninitialized>']) | ||
self.expect("target variable -- array_used_empty", substrs=['0 values']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var array_unused : [Int] = [1,2,3] | ||
var array_used_empty : [Int] = [] | ||
@main struct Main { | ||
static func main() { | ||
print(array_used_empty) | ||
print("break here") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters