Skip to content

Commit

Permalink
Always print UUIDs using uppercase.
Browse files Browse the repository at this point in the history
This changes UUID::toString() to always print using upper case. The previous
behavior was platform specific, resulting in difficulty checking UUIDs in tests.
Serialization/basic_sil.swift and SIL/Parser/basic.sil are now expected to pass
on Linux. This resolves bug SR-417.
  • Loading branch information
Emanuel Zephir committed Dec 30, 2015
1 parent f9c2cd1 commit b013be9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Basic/UUID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Optional<UUID> UUID::fromString(const char *s) {

void UUID::toString(llvm::SmallVectorImpl<char> &out) const {
out.resize(UUID::StringBufferSize);
uuid_unparse(Value, out.data());
uuid_unparse_upper(Value, out.data());
// Pop off the null terminator.
assert(out.back() == '\0' && "did not null-terminate?!");
out.pop_back();
Expand Down
2 changes: 0 additions & 2 deletions test/SIL/Parser/basic.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s

// XFAIL: linux

sil_stage raw // CHECK: sil_stage raw

import Builtin
Expand Down
2 changes: 0 additions & 2 deletions test/Serialization/basic_sil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-module -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -Xfrontend -sil-serialize-all -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil
// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-silgen -Xfrontend -sil-link-all -I %t %s | FileCheck -check-prefix=CHECK_DECL %S/Inputs/def_basic.sil

// XFAIL: linux

// This test currently is written such that no optimizations are assumed.
// REQUIRES: swift_test_mode_optimize_none

Expand Down

0 comments on commit b013be9

Please sign in to comment.