From 4ffb434ca870674c67c106c40f13d322361384c9 Mon Sep 17 00:00:00 2001 From: Gor Nishanov Date: Sun, 2 Oct 2016 03:31:58 +0000 Subject: [PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts Summary: Also makes -fcoroutines_ts to be both a Driver and CC1 flag. Patch mostly by EricWF. Reviewers: rnk, cfe-commits, rsmith, EricWF Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D25130 llvm-svn: 283064 --- clang/include/clang/Basic/LangOptions.def | 2 +- clang/include/clang/Driver/CC1Options.td | 4 ---- clang/include/clang/Driver/Options.td | 7 +++++++ clang/lib/Basic/IdentifierTable.cpp | 2 +- clang/lib/Driver/Tools.cpp | 6 ++++++ clang/lib/Frontend/CompilerInvocation.cpp | 2 +- clang/lib/Frontend/InitPreprocessor.cpp | 2 +- clang/lib/Sema/SemaDecl.cpp | 2 +- clang/test/CodeGenCoroutines/microsoft-abi-operator-coawait.cpp | 2 +- clang/test/Driver/coroutines.c | 6 ++++++ clang/test/Driver/coroutines.cpp | 9 +++++++++ clang/test/Lexer/coroutines.cpp | 2 +- clang/test/Lexer/cxx-features.cpp | 2 +- clang/test/Parser/cxx1z-coroutines.cpp | 2 +- clang/test/SemaCXX/coroutines.cpp | 2 +- 15 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 clang/test/Driver/coroutines.c create mode 100644 clang/test/Driver/coroutines.cpp diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index aed11ff..e65811b 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -133,7 +133,7 @@ LANGOPT(Freestanding, 1, 0, "freestanding implementation") LANGOPT(NoBuiltin , 1, 0, "disable builtin functions") LANGOPT(NoMathBuiltin , 1, 0, "disable math builtin functions") LANGOPT(GNUAsm , 1, 1, "GNU-style inline assembly") -LANGOPT(Coroutines , 1, 0, "C++ coroutines") +LANGOPT(CoroutinesTS , 1, 0, "C++ coroutines TS") BENIGN_LANGOPT(ThreadsafeStatics , 1, 1, "thread-safe static initializers") LANGOPT(POSIXThreads , 1, 0, "POSIX thread support") diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index 66e1ad6..73ab5e6 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -638,10 +638,6 @@ def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, def finclude_default_header : Flag<["-"], "finclude-default-header">, HelpText<"Include the default header file for OpenCL">; -// C++ TSes. -def fcoroutines : Flag<["-"], "fcoroutines">, - HelpText<"Enable support for the C++ Coroutines TS">; - //===----------------------------------------------------------------------===// // Header Search Options //===----------------------------------------------------------------------===// diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index f9390a9..80ec594 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -481,6 +481,13 @@ def fno_autolink : Flag <["-"], "fno-autolink">, Group, Flags<[DriverOption, CC1Option]>, HelpText<"Disable generation of linker directives for automatic library linking">; +// C++ Coroutines TS +def fcoroutines_ts : Flag <["-"], "fcoroutines-ts">, Group, + Flags<[DriverOption, CC1Option]>, + HelpText<"Enable support for the C++ Coroutines TS">; +def fno_coroutines_ts : Flag <["-"], "fno-coroutines-ts">, Group, + Flags<[DriverOption]>; + def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">, Group, Flags<[DriverOption, CC1Option]>, MetaVarName<"