Skip to content

Commit

Permalink
Rename stdlib.noimport to stdlib_binary_only.
Browse files Browse the repository at this point in the history
The name was proposed by Dave and Dmitry in an off-line conversation.

Swift SVN r24449
  • Loading branch information
nadavrot committed Jan 15, 2015
1 parent 290b587 commit 789623d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/SIL/SILModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ const BuiltinInfo &SILModule::getBuiltinInfo(Identifier ID) {
static bool shouldImportFunction(SILFunction *F) {
// Skip functions that are marked with the 'no import' tag. These
// are functions that we don't want to copy from the module.
if (F->hasSemanticsString("stdlib.noimport"))
if (F->hasSemanticsString("stdlib_binary_only"))
return false;

return true;
Expand Down
2 changes: 1 addition & 1 deletion stdlib/core/AssertCommon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func _assertionFailed(
/// This function should not be inlined because it is cold and it inlining just
/// bloats code.
@noreturn @inline(never)
@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
func _fatalErrorMessage(prefix: StaticString, message: StaticString,
file: StaticString, line: UWord) {
#if INTERNAL_CHECKS_ENABLED
Expand Down
10 changes: 5 additions & 5 deletions stdlib/core/OutputStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func _adHocPrint<T, TargetStream : OutputStreamType>(
/// Do not overload this function for your type. Instead, adopt one of the
/// protocols mentioned above.
@inline(never)
@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
public func print<T, TargetStream : OutputStreamType>(
object: T, inout target: TargetStream
) {
Expand Down Expand Up @@ -134,7 +134,7 @@ public func print<T, TargetStream : OutputStreamType>(
/// Do not overload this function for your type. Instead, adopt one of the
/// protocols mentioned above.
@inline(never)
@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
public func println<T, TargetStream : OutputStreamType>(
object: T, inout target: TargetStream
) {
Expand All @@ -151,7 +151,7 @@ public func println<T, TargetStream : OutputStreamType>(
/// Do not overload this function for your type. Instead, adopt one of the
/// protocols mentioned above.
@inline(never)
@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
public func print<T>(object: T) {
var stdoutStream = _Stdout()
print(object, &stdoutStream)
Expand All @@ -167,7 +167,7 @@ public func print<T>(object: T) {
/// Do not overload this function for your type. Instead, adopt one of the
/// protocols mentioned above.
@inline(never)
@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
public func println<T>(object: T) {
var stdoutStream = _Stdout()
print(object, &stdoutStream)
Expand All @@ -176,7 +176,7 @@ public func println<T>(object: T) {

/// Writes a single newline character into the standard output.
@inline(never)
@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
public func println() {
var stdoutStream = _Stdout()
stdoutStream.write("\n")
Expand Down
2 changes: 1 addition & 1 deletion test/SILPasses/Inputs/linker_pass_input.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public func doSomething() {
unknown()
}

@semantics("stdlib.noimport")
@semantics("stdlib_binary_only")
public func doSomething2() {
unknown()
}
2 changes: 1 addition & 1 deletion test/SILPasses/linker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ doSomething()

// Make sure we are not linking doSomethign2 because it is marked with 'noimport'

// CHECK: sil [semantics "stdlib.noimport"] @_TFSs12doSomething2FT_T_ : $@thin () -> ()
// CHECK: sil [semantics "stdlib_binary_only"] @_TFSs12doSomething2FT_T_ : $@thin () -> ()
// CHECK-NOT: return
doSomething2()

Expand Down

0 comments on commit 789623d

Please sign in to comment.