Add IGF::emitByteOffsetGEP to conveniently create a pointer

at a dynamic offset.

Swift SVN r4901
This commit is contained in:
John McCall
2013-04-25 01:39:52 +00:00
parent 03c04d04df
commit a23349caa5
2 changed files with 30 additions and 14 deletions

View File

@@ -148,6 +148,13 @@ public:
Size size, Alignment align);
void emitMemCpy(Address dest, Address src, Size size);
llvm::Value *emitByteOffsetGEP(llvm::Value *base, llvm::Value *offset,
llvm::Type *objectType,
const llvm::Twine &name = "");
Address emitByteOffsetGEP(llvm::Value *base, llvm::Value *offset,
const TypeInfo &type,
const llvm::Twine &name = "");
llvm::Value *emitAllocObjectCall(llvm::Value *metadata, llvm::Value *size,
llvm::Value *align,
const llvm::Twine &name = "");