Permalink
Browse files

refactoring

  • Loading branch information...
1 parent 888627a commit 5fab5211128b7a09c98b97be52f87d254b67fc4e Jason Jackson committed Jun 14, 2011
Showing with 2 additions and 3 deletions.
  1. +1 −1 input.program
  2. +1 −2 src/llvm.clj
View
@@ -1,7 +1,7 @@
func cos(Double) Double;
func printf(...) Integer;
-func bar() Object {
+func bar() Integer {
printf("foo");
return 3;
}
View
@@ -35,7 +35,6 @@
(defn wrap-type [clj-type]
(let [type-map {Double (LLVMDoubleType)
Integer (LLVMInt32Type)
- Object (LLVMOpaqueType)
String (LLVMTypeOf (LLVMConstString "hello" 5 false))}
lookup (type-map clj-type)]
(cond
@@ -62,7 +61,7 @@
(defmethod wrap-value String [v]
(LLVMConstString v (count v) false))
(defmethod wrap-value Integer [v]
- (LLVMConstInt (wrap-type Object) v false))
+ (LLVMConstInt (wrap-type (class v)) v false))
(defmethod wrap-value :default [v] v)
(defn build-call [builder fn args]

0 comments on commit 5fab521

Please sign in to comment.