From e38cea026b92285c8d7acaaceed5c1dd2fa21b71 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 28 May 2017 21:07:22 +0000 Subject: [coroutines] Support "coroutines" feature in module map requires clause Summary: In order for libc++ to add `` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33538 llvm-svn: 304107 --- clang/lib/Basic/Module.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Basic') diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index a6fd931cb17..ac3d7c55967 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/lib/Basic/Module.cpp @@ -64,6 +64,7 @@ static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, bool HasFeature = llvm::StringSwitch(Feature) .Case("altivec", LangOpts.AltiVec) .Case("blocks", LangOpts.Blocks) + .Case("coroutines", LangOpts.CoroutinesTS) .Case("cplusplus", LangOpts.CPlusPlus) .Case("cplusplus11", LangOpts.CPlusPlus11) .Case("freestanding", LangOpts.Freestanding) -- cgit v1.2.3