Factor param/arg ref logic to a class. (#3728)

Just segmenting out a chunk of logic while I'm thinking about function
parameters.
This commit is contained in:
Jon Ross-Perkins
2024-02-27 19:58:19 +00:00
committed by GitHub
parent 85ce06f854
commit 2fee4d072f
10 changed files with 138 additions and 95 deletions
+4 -2
View File
@@ -79,8 +79,10 @@ class InstBlockStack {
// Prints the stack for a stack dump.
auto PrintForStackDump(llvm::raw_ostream& output) const -> void;
auto empty() const -> bool { return size() == 0; }
auto size() const -> int { return size_; }
// Runs verification that the processing cleanly finished.
auto VerifyOnFinish() const -> void { CARBON_CHECK(empty()) << size_; }
auto empty() const -> bool { return size_ == 0; }
private:
struct StackEntry {