diff options
Diffstat (limited to 'src/llvm.cpp')
-rw-r--r-- | src/llvm.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/llvm.cpp b/src/llvm.cpp index 4c8ff2a..cb2d6c1 100644 --- a/src/llvm.cpp +++ b/src/llvm.cpp @@ -140,7 +140,7 @@ LLVMEngine::llType(const AST* t) if (sym == "Int") return Type::getInt32Ty(context); if (sym == "Float") return Type::getFloatTy(context); if (sym == "String") return PointerType::get(Type::getInt8Ty(context), NULL); - if (sym == "Quote") return PointerType::get(Type::getInt8Ty(context), NULL); + if (sym == "Symbol") return PointerType::get(Type::getInt8Ty(context), NULL); } else if (is_form(t, "Fn")) { ATuple::const_iterator i = t->as_tuple()->begin(); const ATuple* protT = (*++i)->to_tuple(); @@ -466,6 +466,9 @@ LLVMEngine::call(CEnv& cenv, CFunc f, const AST* retT) } } ss << "\""; + } else if (retT->str() == "Symbol") { + const std::string s(((char* (*)())fp)()); + ss << s; } else if (t != Type::getVoidTy(context)) { ss << ((void* (*)())fp)(); } else { |