aboutsummaryrefslogtreecommitdiff
path: root/include/cps/FunctionGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-07-26 12:15:33 +0000
committer_ov4 <ov4@ov4.org>2026-07-26 12:15:33 +0000
commit1749b2b4a3e55db7c9bed95376f99b7f07932b49 (patch)
treefca50620a4e6b46609f18abaf205416ea245dce8 /include/cps/FunctionGen.h
parentb9b7f048b0874df0f034f6b1e15e1a4ee2131475 (diff)
refactor: drop per-type micro handlers and the parallel NamedValues map
Integer/Real/Boolean/CharHandler carried only five one-line LLVM API wrappers (now inlined at their call sites in CodeGen.cc) plus dead emitDeclare methods that violated the documented two-table lock-step invariant. StringHandler::emitDeclare (also dead) and its NamedValues reference go too. With the dead writers gone, NamedValues held no information not already in Symbols[].Storage, so the parallel map is removed: getNamedValue reads Symbols, ArrayHandler/FunctionGen take one table, and function bodies save/restore a single map. Behavior unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/FunctionGen.h')
-rw-r--r--include/cps/FunctionGen.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h
index f55db1b..cce17c3 100644
--- a/include/cps/FunctionGen.h
+++ b/include/cps/FunctionGen.h
@@ -25,7 +25,6 @@ class FunctionGen {
llvm::IRBuilder<> &Builder;
TypeSystem &Types;
- std::map<std::string, llvm::Value*> &NamedValues;
std::map<std::string, SymbolInfo> &Symbols;
bool &HadError;
@@ -38,10 +37,9 @@ public:
llvm::Module &M,
llvm::IRBuilder<> &B,
TypeSystem &TS,
- std::map<std::string, llvm::Value*> &NV,
std::map<std::string, SymbolInfo> &Sym,
bool &HadErrorFlag)
- : Context(C), Module(M), Builder(B), Types(TS), NamedValues(NV), Symbols(Sym), HadError(HadErrorFlag) {}
+ : Context(C), Module(M), Builder(B), Types(TS), Symbols(Sym), HadError(HadErrorFlag) {}
llvm::Type *getLLVMType(const std::string &TypeName);