aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2020-11-18 15:26:21 -0800
committerZequan Wu <zequanwu@google.com>2020-11-22 16:05:53 -0800
commit15a3ae1ab1a64cc62041c32ba54914a9dd7b8361 (patch)
tree2bdad503bc071f9b6de8cce66e76a2f7ba60bdf7 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parentc8c3a411c50f541ce5362bd60ee3f8fe43ac2722 (diff)
downloadllvm-15a3ae1ab1a64cc62041c32ba54914a9dd7b8361.zip
llvm-15a3ae1ab1a64cc62041c32ba54914a9dd7b8361.tar.gz
llvm-15a3ae1ab1a64cc62041c32ba54914a9dd7b8361.tar.bz2
[Clang] Add __STDCPP_THREADS__ to standard predefine macros
According to https://eel.is/c++draft/cpp.predefined#2.6, `__STDCPP_THREADS__` is a predefined macro. Differential Revision: https://reviews.llvm.org/D91747
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r--clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index 04bd668..de5c1a4 100644
--- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -49,7 +49,7 @@ class PCHContainerGenerator : public ASTConsumer {
const PreprocessorOptions &PreprocessorOpts;
CodeGenOptions CodeGenOpts;
const TargetOptions TargetOpts;
- const LangOptions LangOpts;
+ LangOptions LangOpts;
std::unique_ptr<llvm::LLVMContext> VMContext;
std::unique_ptr<llvm::Module> M;
std::unique_ptr<CodeGen::CodeGenModule> Builder;
@@ -147,7 +147,7 @@ public:
// The debug info output isn't affected by CodeModel and
// ThreadModel, but the backend expects them to be nonempty.
CodeGenOpts.CodeModel = "default";
- CodeGenOpts.ThreadModel = "single";
+ LangOpts.setThreadModel(LangOptions::ThreadModelKind::Single);
CodeGenOpts.DebugTypeExtRefs = true;
// When building a module MainFileName is the name of the modulemap file.
CodeGenOpts.MainFileName =