summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-27 23:35:43 +0000
committerChris Lattner <sabre@nondot.org>2010-01-27 23:35:43 +0000
commitaeb7be3435f2ad051ebc10bbf9613b7334181056 (patch)
tree71d39a3a57043f3e1e404b991195ed44d0ff2a66 /include/llvm/CodeGen/MachineFunction.h
parentff0210d0b0a41561cce283bf359cd153fa0c49e0 (diff)
downloadllvm-aeb7be3435f2ad051ebc10bbf9613b7334181056.tar.gz
llvm-aeb7be3435f2ad051ebc10bbf9613b7334181056.tar.bz2
llvm-aeb7be3435f2ad051ebc10bbf9613b7334181056.tar.xz
add a helper function for bumping up the alignment of a machine function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 253c1249c5..828540b7ce 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -177,6 +177,11 @@ public:
///
void setAlignment(unsigned A) { Alignment = A; }
+ /// EnsureAlignment - Make sure the function is at least 'A' bits aligned.
+ void EnsureAlignment(unsigned A) {
+ if (Alignment < A) Alignment = A;
+ }
+
/// getInfo - Keep track of various per-function pieces of information for
/// backends that would like to do so.
///