diff --git a/clang/test/Sema/block-explicit-return-type.c b/clang/test/SemaObjC/block-explicit-return-type.m similarity index 96% rename from clang/test/Sema/block-explicit-return-type.c rename to clang/test/SemaObjC/block-explicit-return-type.m index f0a033dc0dc0..cfe72de39523 100644 --- a/clang/test/Sema/block-explicit-return-type.c +++ b/clang/test/SemaObjC/block-explicit-return-type.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -ObjC -fsyntax-only %s -verify -fblocks +// RUN: clang-cc -fsyntax-only %s -verify -fblocks // FIXME: should compile // Test for blocks with explicit return type specified. diff --git a/clang/tools/clang-cc/clang-cc.cpp b/clang/tools/clang-cc/clang-cc.cpp index 31aeb7404999..f3563e6ab2aa 100644 --- a/clang/tools/clang-cc/clang-cc.cpp +++ b/clang/tools/clang-cc/clang-cc.cpp @@ -349,13 +349,6 @@ BaseLang("x", llvm::cl::desc("Base language to compile"), "Objective-C++ header"), clEnumValEnd)); -static llvm::cl::opt -LangObjC("ObjC", llvm::cl::desc("Set base language to Objective-C"), - llvm::cl::Hidden); -static llvm::cl::opt -LangObjCXX("ObjC++", llvm::cl::desc("Set base language to Objective-C++"), - llvm::cl::Hidden); - static llvm::cl::opt ObjCExclusiveGC("fobjc-gc-only", llvm::cl::desc("Use GC exclusively for Objective-C related " @@ -404,14 +397,6 @@ static llvm::cl::opt PThread("pthread", llvm::cl::desc("Support POSIX threads in generated code"), llvm::cl::init(false)); -/// InitializeBaseLanguage - Handle the -x foo options. -static void InitializeBaseLanguage() { - if (LangObjC) - BaseLang = langkind_objc; - else if (LangObjCXX) - BaseLang = langkind_objcxx; -} - static LangKind GetLanguage(const std::string &Filename) { if (BaseLang != langkind_unspecified) return BaseLang; @@ -424,15 +409,9 @@ static LangKind GetLanguage(const std::string &Filename) { } std::string Ext = std::string(Filename.begin()+DotPos+1, Filename.end()); - // C header: .h - // C++ header: .hh or .H; - // assembler no preprocessing: .s - // assembler: .S if (Ext == "c") return langkind_c; - else if (Ext == "S" || - // If the compiler is run on a .s file, preprocess it as .S - Ext == "s") + else if (Ext == "S" || Ext == "s") return langkind_asm_cpp; else if (Ext == "i") return langkind_c_cpp; @@ -2289,7 +2268,6 @@ int main(int argc, char **argv) { LangOptions LangInfo; DiagClient->setLangOptions(&LangInfo); - InitializeBaseLanguage(); LangKind LK = GetLanguage(InFile); InitializeLangOptions(LangInfo, LK); InitializeLanguageStandard(LangInfo, LK, Target.get(), Features);