From 9f084a3166b684573ba49df28fc5792bc37d92e1 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 6 Jul 2011 00:26:06 +0000 Subject: Change the driver's logic about Objective-C runtimes: abstract out a structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/InitPreprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Frontend/InitPreprocessor.cpp') diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index b07fb4395f..9428cd5de0 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -250,7 +250,7 @@ static void AddObjCXXARCLibcxxDefines(const LangOptions &LangOpts, << "}\n" << "\n"; - if (!LangOpts.ObjCNoAutoRefCountRuntime) { + if (LangOpts.ObjCRuntimeHasWeak) { Out << "template \n" << "inline __attribute__ ((__visibility__(\"hidden\")," << "__always_inline__))\n" @@ -318,7 +318,7 @@ static void AddObjCXXARCLibstdcxxDefines(const LangOptions &LangOpts, << "};\n" << "\n"; - if (!LangOpts.ObjCNoAutoRefCountRuntime) { + if (LangOpts.ObjCRuntimeHasWeak) { Out << "template\n" << "struct __is_scalar<__attribute__((objc_ownership(weak))) _Tp> {\n" << " enum { __value = 0 };\n" -- cgit v1.2.3