summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-04-24 01:25:05 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-04-24 01:25:05 +0000
commita0f932349545f99c1eb0c18a234b6d52ed483528 (patch)
treebf2ba3bb1080177d7821bb6b99277e7786ee5a99 /lib/CodeGen/CGCall.cpp
parentf3cb3aa2d9b4afce0c8b818ecb5b8fc590c74dd7 (diff)
[MS ABI] Fix the preferred alignment of member pointers
Member pointers in the MS ABI have different alignment depending on whether they were created on the stack or live in a record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index d82c58fb7e..2e180c97ee 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1813,8 +1813,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
ArgVals.push_back(ValueAndIsPtr(V, HavePointer));
} else {
// Load scalar value from indirect argument.
- CharUnits Alignment = getContext().getTypeAlignInChars(Ty);
- V = EmitLoadOfScalar(V, false, Alignment.getQuantity(), Ty,
+ V = EmitLoadOfScalar(V, false, ArgI.getIndirectAlign(), Ty,
Arg->getLocStart());
if (isPromoted)