aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/xcode-common
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2015-11-17 18:51:10 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-11-18 15:30:07 +0000
commit4b2d54ca002d74863b04e850746ad2a51ed37819 (patch)
tree1bac1198b633196500a2e8607f81fbfe286368e2 /src/tools/xcode-common
parentf30d375c411e0aad9a8248bd7e1508dfa9e7c5ce (diff)
Rename Platform.forArch to Platform.forIosArch, as it is truly doing the latter.
-- MOS_MIGRATED_REVID=108057030
Diffstat (limited to 'src/tools/xcode-common')
-rw-r--r--src/tools/xcode-common/java/com/google/devtools/build/xcode/common/Platform.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/tools/xcode-common/java/com/google/devtools/build/xcode/common/Platform.java b/src/tools/xcode-common/java/com/google/devtools/build/xcode/common/Platform.java
index e17ad12c74..5530276c78 100644
--- a/src/tools/xcode-common/java/com/google/devtools/build/xcode/common/Platform.java
+++ b/src/tools/xcode-common/java/com/google/devtools/build/xcode/common/Platform.java
@@ -52,19 +52,22 @@ public enum Platform {
}
/**
- * Returns the platform for the architecture.
+ * Returns the iOS platform for the given iOS architecture.
+ *
+ * <p>If this method is used in non-iOS contexts, results are undefined. If the input happens
+ * to share an architecture with some iOS platform, this will return that platform even if it is
+ * incorrect (for example, IOS_SIMULATOR for the x86_64 of darwin_x86_64).
*
- * @throws IllegalArgumentException if there is no valid apple platform for the given
- * architecture.
+ * @throws IllegalArgumentException if there is no valid ios platform for the given architecture
*/
- public static Platform forArch(String arch) {
+ public static Platform forIosArch(String arch) {
if (IOS_SIMULATOR_ARCHS.contains(arch)) {
return IOS_SIMULATOR;
} else if (IOS_DEVICE_ARCHS.contains(arch)) {
return IOS_DEVICE;
} else {
throw new IllegalArgumentException(
- "No supported apple platform registered for architecture " + arch);
+ "No supported ios platform registered for architecture " + arch);
}
}
}