mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
common: Decouple LLVM hashing dependencies from common/hashing.h (#7646)
- Move formatted printing to `hashing.cpp` instead of `hashing.h` - Separate APInt and APFloat hashing specializations into a new `hashing_llvm.h` - Update toolchain/base dependencies and include sites that hash LLVM data types to include `hashing_llvm.h` Combined, this reduces the transitive includes caused by `hashing.h`. Assisted-by: Antigravity with Gemini
This commit is contained in:
@@ -6,8 +6,14 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "llvm/Support/FormatVariadic.h"
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
auto HashCode::Print(llvm::raw_ostream& out) const -> void {
|
||||
out << llvm::formatv("{0:x16}", value_);
|
||||
}
|
||||
|
||||
auto Hasher::HashSizedBytesLarge(llvm::ArrayRef<std::byte> bytes) -> void {
|
||||
const std::byte* data_ptr = bytes.data();
|
||||
const ssize_t size = bytes.size();
|
||||
|
||||
Reference in New Issue
Block a user