From f4c3db175101cbf94dad59419c3ed7aed51bf606 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 2 Mar 2012 18:34:30 +0000 Subject: 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 --- lib/CodeGen/CodeGenFunction.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/CodeGen/CodeGenFunction.h') 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 -- cgit v1.2.3