mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename factory functions from 'Create' to 'Make' (#3706)
Similar to #3705, we actually have a mix of `Make` and `Create` in factory functions too, so this PR is normalizing on `Make`. It's intended to be consistent with the naming choice for Carbon factory functions. Note, MakeSyntheticBlock is the only one I feel a little weird about because llvm's own APIs use Create, and this is essentially wrapping LLVM calls. But the flipside is it also feels like a vague line to draw, when we also differ from LLVM coding style in other ways.
This commit is contained in:
@@ -410,12 +410,12 @@ class Driver::CompilationUnit {
|
||||
|
||||
// Loads source and lexes it. Returns true on success.
|
||||
auto RunLex() -> bool {
|
||||
LogCall("SourceBuffer::CreateFromFile", [&] {
|
||||
LogCall("SourceBuffer::MakeFromFile", [&] {
|
||||
if (input_file_name_ == "-") {
|
||||
source_ = SourceBuffer::CreateFromStdin(*consumer_);
|
||||
source_ = SourceBuffer::MakeFromStdin(*consumer_);
|
||||
} else {
|
||||
source_ = SourceBuffer::CreateFromFile(driver_->fs_, input_file_name_,
|
||||
*consumer_);
|
||||
source_ = SourceBuffer::MakeFromFile(driver_->fs_, input_file_name_,
|
||||
*consumer_);
|
||||
}
|
||||
});
|
||||
if (!source_) {
|
||||
@@ -514,7 +514,7 @@ class Driver::CompilationUnit {
|
||||
|
||||
CARBON_VLOG() << "*** CodeGen ***\n";
|
||||
std::optional<CodeGen> codegen =
|
||||
CodeGen::Create(*module_, options_.target, driver_->error_stream_);
|
||||
CodeGen::Make(*module_, options_.target, driver_->error_stream_);
|
||||
if (!codegen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user