aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/FunctionGen.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-27 13:27:14 +0000
committer_ov4 <ov4@ov4.org>2026-10-27 13:27:14 +0000
commit0dd0b0908300eee08a06ee51d9eb48b85fd97d74 (patch)
tree8e18df810a1d88f686f2b85ed2f05e3aa0985119 /lib/CodeGen/FunctionGen.cc
parent790e0fd7c5a81b9a27a6d84e0f3f4c7a0b17d04b (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/FunctionGen.cc')
-rw-r--r--lib/CodeGen/FunctionGen.cc3
1 files changed, 2 insertions, 1 deletions
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;