Generalize FunctionEmitContext::PtrToIntInst and IntToPtrInst to

do the right thing if given a varying lvalue (i.e. an array of
pointers).  Fixes issue #34.
This commit is contained in:
Matt Pharr
2011-06-29 12:37:34 +01:00
parent 5f7e61f9b5
commit eb22fa6173
2 changed files with 48 additions and 18 deletions

8
ctx.h
View File

@@ -305,10 +305,10 @@ public:
llvm::Value *BitCastInst(llvm::Value *value, const llvm::Type *type,
const char *name = NULL);
llvm::Instruction *PtrToIntInst(llvm::Value *value, const llvm::Type *type,
const char *name = NULL);
llvm::Instruction *IntToPtrInst(llvm::Value *value, const llvm::Type *type,
const char *name = NULL);
llvm::Value *PtrToIntInst(llvm::Value *value, const llvm::Type *type,
const char *name = NULL);
llvm::Value *IntToPtrInst(llvm::Value *value, const llvm::Type *type,
const char *name = NULL);
llvm::Instruction *TruncInst(llvm::Value *value, const llvm::Type *type,
const char *name = NULL);
llvm::Instruction *CastInst(llvm::Instruction::CastOps op, llvm::Value *value,