diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm-project/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/contrib/llvm-project/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 0c7e5f4598f8..de5c1a4c8f02 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/contrib/llvm-project/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 = @@ -250,10 +250,10 @@ public: // PCH files don't have a signature field in the control block, // but LLVM detects DWO CUs by looking for a non-zero DWO id. // We use the lower 64 bits for debug info. + uint64_t Signature = - Buffer->Signature - ? (uint64_t)Buffer->Signature[1] << 32 | Buffer->Signature[0] - : ~1ULL; + Buffer->Signature ? Buffer->Signature.truncatedValue() : ~1ULL; + Builder->getModuleDebugInfo()->setDwoId(Signature); // Finalize the Builder. |