aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RealHandler.cc
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 /lib/CodeGen/RealHandler.cc
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 'lib/CodeGen/RealHandler.cc')
-rw-r--r--lib/CodeGen/RealHandler.cc16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/CodeGen/RealHandler.cc b/lib/CodeGen/RealHandler.cc
deleted file mode 100644
index a73dee2..0000000
--- a/lib/CodeGen/RealHandler.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "cps/RealHandler.h"
-
-using namespace llvm;
-using namespace cps;
-
-void RealHandler::emitDeclare(const std::string &Name) {
- Function *TheFunction = Builder.GetInsertBlock()->getParent();
- IRBuilder<> TmpB(&TheFunction->getEntryBlock(), TheFunction->getEntryBlock().begin());
- AllocaInst *Alloca = TmpB.CreateAlloca(Type::getDoubleTy(Context), nullptr, Name);
- Builder.CreateStore(ConstantFP::get(Context, APFloat(0.0)), Alloca);
- NamedValues[Name] = Alloca;
-}
-
-Value *RealHandler::createLiteral(double Val) {
- return ConstantFP::get(Context, APFloat(Val));
-}