diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-14 03:31:47 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-14 03:31:47 +0000 |
| commit | 2147449f4d6f37b4624990ff26bce58ebf3cfb4b (patch) | |
| tree | bbf09cea539b8ea01ee3d392ec828067552fa4b7 /include/cps/CodeGen.h | |
| parent | 699e18b65b07af73ccd14b28f83572b1843c7d37 (diff) | |
feat(parser): add explicit parenthesized type casts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
| -rw-r--r-- | include/cps/CodeGen.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index acd6cb2..5043417 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -20,6 +20,7 @@ namespace cps { class ArrayHandler; class FileHandler; class ExceptionHandler; +class CastExprAST; class CodeGen { std::unique_ptr<llvm::LLVMContext> TheContext; @@ -66,6 +67,9 @@ class CodeGen { bool isWholeArrayVar(ExprAST *Expr) const; const TypeInfo *getExprTypeInfo(ExprAST *Expr) const; llvm::Value *coerceValueToType(llvm::Value *Val, const TypeInfo *TargetInfo); + llvm::Value *convertNumericValue(llvm::Value *Val, const TypeInfo *Source, + const TypeInfo *Target); + llvm::Value *emitCast(CastExprAST *Cast); // TYPE-system helpers (Designator.cc). void runTypePrePass(const std::vector<std::unique_ptr<StmtAST>> &Statements); |
