diff options
author | Jay Foad <jay.foad@gmail.com> | 2012-03-02 18:34:30 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2012-03-02 18:34:30 +0000 |
commit | f4c3db175101cbf94dad59419c3ed7aed51bf606 (patch) | |
tree | a683d89a141cd2b96d00d70eef54fe9ef29c46c9 /lib/CodeGen/CodeGenFunction.h | |
parent | a0e005b06b271f6dd1fdbbeed03d9e14f7f3e6a3 (diff) |
PR12094: Set the alignment of memory intrinsic instructions based on the
types of the pointer arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 7f39868dd9..d2eaa68298 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2581,6 +2581,16 @@ private: const AutoVarEmission &emission); void AddObjCARCExceptionMetadata(llvm::Instruction *Inst); + + /// GetPointeeAlignment - Given an expression with a pointer type, find the + /// alignment of the type referenced by the pointer. Skip over implicit + /// casts. + unsigned GetPointeeAlignment(const Expr *Addr); + + /// GetPointeeAlignmentValue - Given an expression with a pointer type, find + /// the alignment of the type referenced by the pointer. Skip over implicit + /// casts. Return the alignment as an llvm::Value. + llvm::Value *GetPointeeAlignmentValue(const Expr *Addr); }; /// Helper class with most of the code for saving a value for a |