about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/glittershark/achilles/src/codegen/llvm.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/users/glittershark/achilles/src/codegen/llvm.rs b/users/glittershark/achilles/src/codegen/llvm.rs
index ee087845b6..9b580d3c45 100644
--- a/users/glittershark/achilles/src/codegen/llvm.rs
+++ b/users/glittershark/achilles/src/codegen/llvm.rs
@@ -92,7 +92,11 @@ impl<'ctx, 'ast> Codegen<'ctx, 'ast> {
                     Literal::Bool(b) => Ok(AnyValueEnum::IntValue(
                         ty.const_int(if *b { 1 } else { 0 }, false),
                     )),
-                    Literal::String(_) => todo!(),
+                    Literal::String(s) => Ok(self
+                        .builder
+                        .build_global_string_ptr(s, "s")
+                        .as_pointer_value()
+                        .into()),
                 }
             }
             Expr::UnaryOp { op, rhs, .. } => {