aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index cbbbc5c4de..0cce517549 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -15,7 +15,9 @@
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/HostInfo.h"
+#include "clang/Driver/ObjCRuntime.h"
#include "clang/Driver/Options.h"
+#include "llvm/Support/ErrorHandling.h"
using namespace clang::driver;
@@ -47,6 +49,23 @@ bool ToolChain::HasNativeLLVMSupport() const {
return false;
}
+void ToolChain::configureObjCRuntime(ObjCRuntime &runtime) const {
+ switch (runtime.getKind()) {
+ case ObjCRuntime::NeXT:
+ // Assume a minimal NeXT runtime.
+ runtime.HasARC = false;
+ runtime.HasWeak = false;
+ return;
+
+ case ObjCRuntime::GNU:
+ // Assume a maximal GNU runtime.
+ runtime.HasARC = true;
+ runtime.HasWeak = true;
+ return;
+ }
+ llvm_unreachable("invalid runtime kind!");
+}
+
/// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targeting.
//
// FIXME: tblgen this.