Revert "Fix crash from accessing a Check::Context during lowering (#7335)" (#7353)

This reverts commit afd679129d.

The commit introduced ASAN errors:

https://github.com/carbon-language/carbon-lang/actions/runs/27436787960/job/81100665405
This commit is contained in:
Nicholas Bishop
2026-06-12 23:04:50 +00:00
committed by GitHub
parent 250da35c3b
commit 40d2d8f68c
14 changed files with 169 additions and 495 deletions
+7
View File
@@ -51,6 +51,13 @@ auto ExportAllFieldsToCpp(Context& context, SemIR::Class& class_info) -> void;
auto ExportFieldToCpp(Context& context, SemIR::InstId field_inst_id,
SemIR::FieldDecl field_decl) -> clang::FieldDecl*;
// Get the field offset for each field in a class.
//
// Returns true on success, false if any error occurs.
auto CalculateCppFieldOffsets(
Context& context, SemIR::ClassId class_id,
llvm::DenseMap<const clang::FieldDecl*, uint64_t>& field_offsets) -> bool;
// Get a `clang::FunctionDecl` that can be used to call a Carbon function.
auto ExportFunctionToCpp(Context& context, SemIR::LocId loc_id,
SemIR::FunctionId function_id) -> clang::FunctionDecl*;