diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-28 21:07:22 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-28 21:07:22 +0000 |
commit | e38cea026b92285c8d7acaaceed5c1dd2fa21b71 (patch) | |
tree | 9043cd3cb8978b7cdeeb125180e85147bf308d38 /clang/lib/Basic/Module.cpp | |
parent | 09fcc2ce9b45b5c5437a4b62b9f632939fdfe79e (diff) | |
download | llvm-e38cea026b92285c8d7acaaceed5c1dd2fa21b71.zip llvm-e38cea026b92285c8d7acaaceed5c1dd2fa21b71.tar.gz llvm-e38cea026b92285c8d7acaaceed5c1dd2fa21b71.tar.bz2 |
[coroutines] Support "coroutines" feature in module map requires clause
Summary: In order for libc++ to add `<experimental/coroutine>` 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
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r-- | clang/lib/Basic/Module.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index a6fd931..ac3d7c5 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<bool>(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) |