Skip to content

Commit 992ca56

Browse files
committed
[Basic] Remove swift::tripleIsAnySimulator().
It's just Triple::isSimulatorEnvironment() now.
1 parent 7e7dc64 commit 992ca56

File tree

5 files changed

+3
-10
lines changed

5 files changed

+3
-10
lines changed

include/swift/Basic/Platform.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ namespace swift {
4343
/// Returns true if the given triple represents watchOS running in a simulator.
4444
bool tripleIsWatchSimulator(const llvm::Triple &triple);
4545

46-
/// Return true if the given triple represents any simulator.
47-
bool tripleIsAnySimulator(const llvm::Triple &triple);
48-
4946
/// Returns true if the given triple represents a macCatalyst environment.
5047
bool tripleIsMacCatalystEnvironment(const llvm::Triple &triple);
5148

lib/Basic/LangOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
361361
// Set the "targetEnvironment" platform condition if targeting a simulator
362362
// environment. Otherwise _no_ value is present for targetEnvironment; it's
363363
// an optional disambiguating refinement of the triple.
364-
if (swift::tripleIsAnySimulator(Target))
364+
if (Target.isSimulatorEnvironment())
365365
addPlatformConditionValue(PlatformConditionKind::TargetEnvironment,
366366
"simulator");
367367

lib/Basic/Platform.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ bool swift::tripleIsWatchSimulator(const llvm::Triple &triple) {
3232
return (triple.isWatchOS() && triple.isSimulatorEnvironment());
3333
}
3434

35-
bool swift::tripleIsAnySimulator(const llvm::Triple &triple) {
36-
return triple.isSimulatorEnvironment();
37-
}
38-
3935
bool swift::tripleIsMacCatalystEnvironment(const llvm::Triple &triple) {
4036
return triple.isiOS() && !triple.isTvOS() &&
4137
triple.getEnvironment() == llvm::Triple::MacABI;

lib/Driver/DarwinToolChains.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ toolchains::Darwin::addProfileGenerationArgs(ArgStringList &Arguments,
465465
}
466466

467467
StringRef Sim;
468-
if (tripleIsAnySimulator(Triple)) {
468+
if (Triple.isSimulatorEnvironment()) {
469469
Sim = "sim";
470470
}
471471

lib/IRGen/SwiftTargetInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void configureX86_64(IRGenModule &IGM, const llvm::Triple &triple,
6969
SWIFT_ABI_X86_64_SWIFT_SPARE_BITS_MASK);
7070
setToMask(target.IsObjCPointerBit, 64, SWIFT_ABI_X86_64_IS_OBJC_BIT);
7171

72-
if (tripleIsAnySimulator(triple)) {
72+
if (triple.isSimulatorEnvironment()) {
7373
setToMask(target.ObjCPointerReservedBits, 64,
7474
SWIFT_ABI_X86_64_SIMULATOR_OBJC_RESERVED_BITS_MASK);
7575
} else {

0 commit comments

Comments
 (0)