aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ExpressionGen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/ExpressionGen.cc')
-rw-r--r--lib/CodeGen/ExpressionGen.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/CodeGen/ExpressionGen.cc b/lib/CodeGen/ExpressionGen.cc
index 3377a39..ece055a 100644
--- a/lib/CodeGen/ExpressionGen.cc
+++ b/lib/CodeGen/ExpressionGen.cc
@@ -225,11 +225,7 @@ Value *CodeGen::emitCall(const std::string &Callee,
return Memory->emitRelease(Address, Line);
}
if (Name == "EOF") {
- if (isWholeArrayVar(ArgExprs[0].get())) {
- reportError("Cannot use a whole array as the EOF filename");
- return nullptr;
- }
- Value *FileName = emitCStringExpr(ArgExprs[0].get());
+ Value *FileName = emitFileNameOperand(ArgExprs[0].get(), "EOF");
if (!FileName) return nullptr;
return Files->emitEof(FileName, Line);
}