diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-27 23:35:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-27 23:35:43 +0000 |
commit | aeb7be3435f2ad051ebc10bbf9613b7334181056 (patch) | |
tree | 71d39a3a57043f3e1e404b991195ed44d0ff2a66 /include | |
parent | ff0210d0b0a41561cce283bf359cd153fa0c49e0 (diff) | |
download | external_llvm-aeb7be3435f2ad051ebc10bbf9613b7334181056.zip external_llvm-aeb7be3435f2ad051ebc10bbf9613b7334181056.tar.gz external_llvm-aeb7be3435f2ad051ebc10bbf9613b7334181056.tar.bz2 |
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')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 253c124..828540b 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. /// |