From ea93e40785ffeadfac66b948c95f9490ec26207a Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 23 Aug 2012 03:10:17 +0000 Subject: Use the alignment from lvalue emission to more accurately compute the alignment of a pointer for builtin emission, instead of just depending on the type of the pointee. . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162425 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index ed3e43beb0..c6261ecebc 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2624,15 +2624,9 @@ private: 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); + /// GetPointeeAlignment - Given an expression with a pointer type, emit the + /// value and compute our best estimate of the alignment of the pointee. + std::pair EmitPointerWithAlignment(const Expr *Addr); }; /// Helper class with most of the code for saving a value for a -- cgit v1.2.3