[llvm-commits] [llvm] r94700 - /llvm/trunk/include/llvm/CodeGen/MachineFunction.h
Chris Lattner
sabre at nondot.org
Wed Jan 27 15:35:43 PST 2010
Author: lattner
Date: Wed Jan 27 17:35:43 2010
New Revision: 94700
URL: http://llvm.org/viewvc/llvm-project?rev=94700&view=rev
Log:
add a helper function for bumping up the alignment of a machine function.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineFunction.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=94700&r1=94699&r2=94700&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Wed Jan 27 17:35:43 2010
@@ -177,6 +177,11 @@
///
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.
///
More information about the llvm-commits
mailing list