From a78119062f100f3da6e1243ce464c2819da64a2b Mon Sep 17 00:00:00 2001
From: Matthias Andreas Benkard <matthias@benkard.de>
Date: Sat, 16 Aug 2008 21:56:34 +0200
Subject: MLKLexicalContext(MLKLLVMCompilation): Further fix value types.

---
 MLKLexicalContext-MLKLLVMCompilation.h  |  5 +++--
 MLKLexicalContext-MLKLLVMCompilation.mm | 12 +++++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/MLKLexicalContext-MLKLLVMCompilation.h b/MLKLexicalContext-MLKLLVMCompilation.h
index eaae1f3..d42140e 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.h
+++ b/MLKLexicalContext-MLKLLVMCompilation.h
@@ -26,6 +26,7 @@
 #include <vector>
 #include <llvm/Value.h>
 #include <llvm/BasicBlock.h>
+#include <llvm/Instructions.h>
 using namespace llvm;
 #endif
 
@@ -34,8 +35,8 @@ using namespace llvm;
 #ifdef __cplusplus
 -(void) setVariableHeapAllocation:(BOOL)heapp forSymbol:(id)name;
 -(BOOL) variableHeapAllocationForSymbol:(id)name;
--(Value *) functionCellValueForSymbol:(id)name;
--(Value *) closureDataPointerValueForSymbol:(id)name;
+-(Instruction *) functionCellValueForSymbol:(id)name;
+-(Instruction *) closureDataPointerValueForSymbol:(id)name;
 -(Value *) bindingValueForSymbol:(id)name;
 -(Value *) valueValueForSymbol:(id)name;
 //-(void) setFunctionCellValue:(Value *)cellPtr forSymbol:(id)name;
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm
index 9ca18e4..744351a 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.mm
+++ b/MLKLexicalContext-MLKLLVMCompilation.mm
@@ -48,19 +48,21 @@ using namespace std;
   return (flag && [flag boolValue]);
 }
 
--(Value *) functionCellValueForSymbol:(id)name
+-(Instruction *) functionCellValueForSymbol:(id)name
 {
   std::vector<const Type *> types (1, PointerType::get(Type::Int8Ty, 0));
   return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty,
                                              (uint64_t)[self functionCellForSymbol:name],
                                              false),
-                            PointerType::get(FunctionType::get(PointerType::get(Type::Int8Ty, 0),
-                                                               types,
-                                                               true),
+                            PointerType::get(PointerType::get(FunctionType::get(PointerType::get(Type::Int8Ty,
+                                                                                                 0),
+                                                                                types,
+                                                                                true),
+                                                              0),
                                              0)));
 }
 
--(Value *) closureDataPointerValueForSymbol:(id)name
+-(Instruction *) closureDataPointerValueForSymbol:(id)name
 {
   return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty,
                                              (uint64_t)[self closureDataPointerForSymbol:name],
-- 
cgit v1.2.3