Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Jackson committed Jun 14, 2011
1 parent 888627a commit 5fab521
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion input.program
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
func cos(Double) Double;
func printf(...) Integer;

func bar() Object {
func bar() Integer {
printf("foo");
return 3;
}
Expand Down
3 changes: 1 addition & 2 deletions src/llvm.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit 5fab521

Please sign in to comment.