summaryrefslogtreecommitdiffstats
path: root/lib/Basic/ObjCRuntime.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-09-16 16:31:49 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-09-16 16:31:49 +0000
commit585c84c5afd91f57b84b0236aa28620438cfe636 (patch)
treeff7e948b3d50f0dabe662e2918259fc44a251f07 /lib/Basic/ObjCRuntime.cpp
parentf55e36a9d88dc2c625c05d6bc560099e2236dfbe (diff)
Add a define for the ObjFW runtime ABI version.
This removes __has_feature(objc_msg_lookup_stret), as it is not required anymore after this patch. Patch by Jonathan Schleifer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/ObjCRuntime.cpp')
-rw-r--r--lib/Basic/ObjCRuntime.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Basic/ObjCRuntime.cpp b/lib/Basic/ObjCRuntime.cpp
index 9bd433a064..be50fc4fe2 100644
--- a/lib/Basic/ObjCRuntime.cpp
+++ b/lib/Basic/ObjCRuntime.cpp
@@ -71,16 +71,20 @@ bool ObjCRuntime::tryParse(StringRef input) {
kind = ObjCRuntime::GCC;
} else if (runtimeName == "objfw") {
kind = ObjCRuntime::ObjFW;
+ Version = VersionTuple(0, 8);
} else {
return true;
}
TheKind = kind;
-
+
if (dash != StringRef::npos) {
StringRef verString = input.substr(dash + 1);
- if (Version.tryParse(verString))
+ if (Version.tryParse(verString))
return true;
}
+ if (kind == ObjCRuntime::ObjFW && Version > VersionTuple(0, 8))
+ Version = VersionTuple(0, 8);
+
return false;
}