diff options
-rw-r--r-- | include/llvm/Instructions.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index e6c3ca9fe9..8c62d3de3b 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -68,6 +68,10 @@ public: /// by the instruction. /// unsigned getAlignment() const { return Alignment; } + void setAlignment(unsigned Align) { + assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); + Alignment = Align; + } virtual Instruction *clone() const = 0; |