[PATCH] Expose {Load,Store}Inst {get,set}Alignment to the C API.

Nick Lewycky nicholas at mxc.ca
Mon Jun 10 22:50:02 PDT 2013


Peter Zotov wrote:
> Existing LLVM{Get,Set}Alignment functions do not work on instructions,
> as they use unwrap<GlobalValue>.
>
> There are three variants of shortening "Instruction" in the C API:
> * LLVMGetInstructionCallConv
> * LLVMAddInstrAttribute
> * LLVMSetInstDebugLocation
>
> This commit uses the conservative variant, "Instruction".

+void LLVMSetInstructionAlignment(LLVMValueRef MemAccessInst, LLVMBool 
Alignment) {

Alignment as a bool?

Also, this uses tabs for indent. Please use two spaces.

Nick



More information about the llvm-commits mailing list