From 0dd0b0908300eee08a06ee51d9eb48b85fd97d74 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 27 Oct 2026 13:27:14 +0000 Subject: refactor(memory)!: move allocation functions into memory.cps Route keyword NEW and DELETE through the same library runtime and retain allocation tracking, runtime diagnostics and exception behavior. BREAKING CHANGE: -no-std programs using NEW or DELETE must explicitly import memory.cps. Co-Authored-By: Claude Opus 5.5 --- lib/CodeGen/FunctionGen.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/FunctionGen.cc') diff --git a/lib/CodeGen/FunctionGen.cc b/lib/CodeGen/FunctionGen.cc index 2e927f9..c162b46 100644 --- a/lib/CodeGen/FunctionGen.cc +++ b/lib/CodeGen/FunctionGen.cc @@ -158,7 +158,8 @@ bool FunctionGen::validatePrototype(PrototypeAST *Proto) { return false; } if (Proto->getOwnerClass().empty()) { - if (!Proto->isExternal() && isReservedRuntimeName(Proto->getName())) { + // OVERLOAD symbols carry a signature and cannot replace libc symbols. + if (!Proto->isExternal() && !Proto->isOverload() && isReservedRuntimeName(Proto->getName())) { reportError("'%s' is a reserved runtime symbol and cannot be a FUNCTION/PROCEDURE name", Proto->getName().c_str()); return false; -- cgit v1.3.1-4-g156e