IRgen: Set the alignment correctly when creating LValue for a decls.
- Fixes PR5598.
- Review appreciated.
llvm-svn: 111726
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 603d309..f54a011 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -969,8 +969,8 @@
// Helpers
//===--------------------------------------------------------------------===//
- LValue MakeAddrLValue(llvm::Value *V, QualType T) {
- return LValue::MakeAddr(V, T, 0, getContext());
+ LValue MakeAddrLValue(llvm::Value *V, QualType T, unsigned Alignment = 0) {
+ return LValue::MakeAddr(V, T, Alignment, getContext());
}
/// CreateTempAlloca - This creates a alloca and inserts it into the entry