From fa98390b3c3144c7cd446621526ca04c075435d8 Mon Sep 17 00:00:00 2001 From: Erik Pilkington Date: Tue, 30 Oct 2018 20:31:30 +0000 Subject: NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 llvm-svn: 345637 --- clang/lib/Frontend/CompilerInvocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index d158745..92a421d 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1915,7 +1915,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, if (IK.getLanguage() == InputKind::Asm) { Opts.AsmPreprocessor = 1; } else if (IK.isObjectiveC()) { - Opts.ObjC1 = Opts.ObjC2 = 1; + Opts.ObjC = 1; } if (LangStd == LangStandard::lang_unspecified) { @@ -2246,7 +2246,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.GPURelocatableDeviceCode = Args.hasArg(OPT_fgpu_rdc); - if (Opts.ObjC1) { + if (Opts.ObjC) { if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) { StringRef value = arg->getValue(); if (Opts.ObjCRuntime.tryParse(value)) -- cgit v1.1