diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-05 21:58:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-05 21:58:30 +0000 |
commit | d775e1837fe7a76d3c6d8adc00cc34174f839c06 (patch) | |
tree | 1ebd2e68e33d7752fa93dc413063deff1c0f47c0 /llvm | |
parent | 79b8c792423ef9dbd8b7797e160625088ffbcab6 (diff) | |
download | bcm5719-llvm-d775e1837fe7a76d3c6d8adc00cc34174f839c06.tar.gz bcm5719-llvm-d775e1837fe7a76d3c6d8adc00cc34174f839c06.zip |
add an accessor
llvm-svn: 24201
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Instructions.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/Instructions.h b/llvm/include/llvm/Instructions.h index e6c3ca9fe91..8c62d3de3b4 100644 --- a/llvm/include/llvm/Instructions.h +++ b/llvm/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; |