aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGen.cc')
-rw-r--r--lib/CodeGen/CodeGen.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGen.cc b/lib/CodeGen/CodeGen.cc
index 4b9ebfb..8940e63 100644
--- a/lib/CodeGen/CodeGen.cc
+++ b/lib/CodeGen/CodeGen.cc
@@ -3,6 +3,7 @@
#include "cps/FileAST.h"
#include "cps/FileHandler.h"
#include "cps/Lexer.h"
+#include "cps/TypeAST.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Verifier.h"
#include <cstdarg>
@@ -619,6 +620,12 @@ Value *CodeGen::emitExpr(ExprAST *Expr) {
return FuncGen->emitCallExpr(Call, Args);
}
+ // TYPE-system stubs: parsed but not yet wired (phases C/D/E of the TYPE work).
+ if (dynamic_cast<DesignatorExprAST*>(Expr) || dynamic_cast<AddrOfExprAST*>(Expr)) {
+ reportError("Record field / pointer expressions are not implemented yet");
+ return nullptr;
+ }
+
return nullptr;
}
@@ -1039,4 +1046,15 @@ void CodeGen::emitStmt(StmtAST *Stmt) {
emitForStmt(ForStmt);
return;
}
+
+ // TYPE-system stubs: parsed but not yet wired (phases C/D of the TYPE work).
+ if (dynamic_cast<EnumTypeDeclAST*>(Stmt) || dynamic_cast<PointerTypeDeclAST*>(Stmt) ||
+ dynamic_cast<RecordTypeDeclAST*>(Stmt)) {
+ reportError("TYPE declarations are not implemented yet");
+ return;
+ }
+ if (dynamic_cast<DesignatorAssignStmtAST*>(Stmt)) {
+ reportError("Assignment to record fields / pointer targets is not implemented yet");
+ return;
+ }
}