mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
Start tracking the domain within `CppContext`s instead of having them duplicate its fields. This allows us to remove the shared ownership of the clang parser. --------- Co-authored-by: Christopher Di Bella <cjdb.ns@gmail.com>
23 lines
772 B
C++
23 lines
772 B
C++
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#include "toolchain/check/cpp/domain.h"
|
|
|
|
#include "clang/Parse/Parser.h"
|
|
|
|
namespace Carbon::Check {
|
|
|
|
CppDomain::CppDomain(std::shared_ptr<clang::CompilerInstance> clang_instance,
|
|
std::unique_ptr<clang::Parser> parser,
|
|
clang::CodeGenerator* code_generator,
|
|
llvm::LLVMContext* llvm_context)
|
|
: clang_instance_(std::move(clang_instance)),
|
|
parser_(std::move(parser)),
|
|
code_generator_(code_generator),
|
|
llvm_context_(llvm_context) {}
|
|
|
|
CppDomain::~CppDomain() = default;
|
|
|
|
} // namespace Carbon::Check
|