aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-05 21:58:30 +0000
committerChris Lattner <sabre@nondot.org>2005-11-05 21:58:30 +0000
commit8ae779da700f2b1d27598fe71a81cc717a8c461c (patch)
treed7c33f190751cd11f4775ab86f18b76afc486feb /include/llvm/Instructions.h
parent6033716140c18887174d3371ef7c9a840e001a24 (diff)
downloadexternal_llvm-8ae779da700f2b1d27598fe71a81cc717a8c461c.zip
external_llvm-8ae779da700f2b1d27598fe71a81cc717a8c461c.tar.gz
external_llvm-8ae779da700f2b1d27598fe71a81cc717a8c461c.tar.bz2
add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index e6c3ca9..8c62d3d 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;