diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-18 08:04:15 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-18 08:04:15 +0000 |
| commit | 927e3fc0384c941f9ad313a28768660c3cdb1777 (patch) | |
| tree | ee82bef8d8332dad79d05db87f33979f0e7eb423 /lib/CodeGen/MemoryHandler.cc | |
| parent | 34a4998658674411ef3b5a392483990467a5d6e2 (diff) | |
feat(driver): add #LIB directive hiding library lines in runtime errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/MemoryHandler.cc')
| -rw-r--r-- | lib/CodeGen/MemoryHandler.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/MemoryHandler.cc b/lib/CodeGen/MemoryHandler.cc index fa25eb9..7cb62b3 100644 --- a/lib/CodeGen/MemoryHandler.cc +++ b/lib/CodeGen/MemoryHandler.cc @@ -114,12 +114,12 @@ void MemoryHandler::buildRelease() { Value *MemoryHandler::emitAllocate(Value *Size, int Line) { ensureRuntime(); - return Exceptions.emitCall(AllocateFn, {Size, Builder.getInt32(Line)}, "allocated"); + return Exceptions.emitCall(AllocateFn, {Size, Checker.lineValue(Line)}, "allocated"); } Value *MemoryHandler::emitRelease(Value *Address, int Line) { ensureRuntime(); - return Exceptions.emitCall(ReleaseFn, {Address, Builder.getInt32(Line)}, "released"); + return Exceptions.emitCall(ReleaseFn, {Address, Checker.lineValue(Line)}, "released"); } void MemoryHandler::buildResize() { @@ -150,10 +150,10 @@ void MemoryHandler::buildResize() { Value *MemoryHandler::emitResize(Value *Address, Value *Size, int Line) { ensureRuntime(); - return Exceptions.emitCall(ResizeFn, {Address, Size, Builder.getInt32(Line)}, "resized"); + return Exceptions.emitCall(ResizeFn, {Address, Size, Checker.lineValue(Line)}, "resized"); } void MemoryHandler::emitValidate(Value *Address, int Line) { ensureRuntime(); - Exceptions.emitCall(FindFn, {Address, Builder.getInt32(Line)}); + Exceptions.emitCall(FindFn, {Address, Checker.lineValue(Line)}); } |
