diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-30 14:31:07 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-30 14:31:07 +0000 |
| commit | 0cf54b4f77ccf8376341950b02ceb7c1d1268ed7 (patch) | |
| tree | eebbba01063451c28f0a2e1cc048215f50beb98f /lib/CodeGen/ExpressionGen.cc | |
| parent | 4cb0d9b196008bc55dbfcdac1f9211dbbc879895 (diff) | |
refactor(strings): construct string values implicitly from raw literals
Keep double-quoted literals and text constants as C_STRING values. Use
marked STRING constructors for text and CHAR conversion, preserving
string operations and I/O through the existing class machinery.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/ExpressionGen.cc')
| -rw-r--r-- | lib/CodeGen/ExpressionGen.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/ExpressionGen.cc b/lib/CodeGen/ExpressionGen.cc index 463dbed..061bcd2 100644 --- a/lib/CodeGen/ExpressionGen.cc +++ b/lib/CodeGen/ExpressionGen.cc @@ -33,8 +33,7 @@ Value *CodeGen::emitExpr(ExprAST *Expr) { } if (auto *Str = dynamic_cast<StringExprAST*>(Expr)) { - Value *Text = Builder->CreateGlobalString(Str->getVal()); - return Str->isCString() ? Text : emitStringFromCString(Text); + return Builder->CreateGlobalString(Str->getVal()); } if (auto *Var = dynamic_cast<VariableExprAST*>(Expr)) { |
