aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-08-23 03:10:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-08-23 03:10:17 +0000
commitea93e40785ffeadfac66b948c95f9490ec26207a (patch)
tree6a362e4eb0dc758c46b2c6a2b14d261000b41500 /lib/CodeGen/CodeGenFunction.h
parent2d5a1de741c94f15461b06cd09a65081c7ce3d70 (diff)
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. <rdar://problem/11314941>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h12
1 files changed, 3 insertions, 9 deletions
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<llvm::Value*, unsigned> EmitPointerWithAlignment(const Expr *Addr);
};
/// Helper class with most of the code for saving a value for a