mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 22:02:41 +01:00
This avoids the need to make copies of potentially large maps when the same bindings are used in multiple values, such as when forming a bound method value.
15 lines
413 B
C++
15 lines
413 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 "explorer/ast/bindings.h"
|
|
|
|
namespace Carbon {
|
|
|
|
auto Bindings::None() -> Nonnull<const Bindings*> {
|
|
static Nonnull<const Bindings*> bindings = new Bindings({}, {});
|
|
return bindings;
|
|
}
|
|
|
|
} // namespace Carbon
|