summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/ObjCRuntime.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2012-07-04 10:37:03 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2012-07-04 10:37:03 +0000
commit314896c9fc42126a218003aed0fb659bef2722e1 (patch)
treea473f8ab6eef11c4f63275e8114d5f67d26ac32b /clang/lib/Basic/ObjCRuntime.cpp
parent5cbbf4ca57ff459c4a3c74485b03741c89f34421 (diff)
downloadbcm5719-llvm-314896c9fc42126a218003aed0fb659bef2722e1.tar.gz
bcm5719-llvm-314896c9fc42126a218003aed0fb659bef2722e1.zip
A few more cleanups for the GNU family of ObjC runtimes.
llvm-svn: 159708
Diffstat (limited to 'clang/lib/Basic/ObjCRuntime.cpp')
-rw-r--r--clang/lib/Basic/ObjCRuntime.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Basic/ObjCRuntime.cpp b/clang/lib/Basic/ObjCRuntime.cpp
index 0f30bfaa2c4..f52677b5122 100644
--- a/clang/lib/Basic/ObjCRuntime.cpp
+++ b/clang/lib/Basic/ObjCRuntime.cpp
@@ -54,6 +54,7 @@ bool ObjCRuntime::tryParse(StringRef input) {
// Everything prior to that must be a valid string name.
Kind kind;
StringRef runtimeName = input.substr(0, dash);
+ Version = VersionTuple(0);
if (runtimeName == "macosx") {
kind = ObjCRuntime::MacOSX;
} else if (runtimeName == "macosx-fragile") {
@@ -61,6 +62,9 @@ bool ObjCRuntime::tryParse(StringRef input) {
} else if (runtimeName == "ios") {
kind = ObjCRuntime::iOS;
} else if (runtimeName == "gnustep") {
+ // If no version is specified then default to the most recent one that we
+ // know about.
+ Version = VersionTuple(1, 6);
kind = ObjCRuntime::GNUstep;
} else if (runtimeName == "gcc") {
kind = ObjCRuntime::GCC;
@@ -69,7 +73,6 @@ bool ObjCRuntime::tryParse(StringRef input) {
}
TheKind = kind;
- Version = VersionTuple(0);
if (dash != StringRef::npos) {
StringRef verString = input.substr(dash + 1);
if (Version.tryParse(verString))
OpenPOWER on IntegriCloud