diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-02-09 02:48:28 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-09 02:48:28 +0000 |
| commit | 195337d2e5d4625ae9dc1328c7cdbc7115b0261b (patch) | |
| tree | 26b92950c3fa7023d4e4d136f649b52da1088eb2 /lib/CodeGen/CGExprCXX.cpp | |
| parent | e180ed2f014d49587bc49f09313cabf38080d6fa (diff) | |
| download | clang-195337d2e5d4625ae9dc1328c7cdbc7115b0261b.tar.gz clang-195337d2e5d4625ae9dc1328c7cdbc7115b0261b.tar.bz2 clang-195337d2e5d4625ae9dc1328c7cdbc7115b0261b.tar.xz | |
IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.
- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!
PR6240.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 7af90b7a46..0328621604 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -164,8 +164,7 @@ CodeGenFunction::EmitCXXMemberPointerCallExpr(const CXXMemberCallExpr *E, const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(VMContext); // Get the member function pointer. - llvm::Value *MemFnPtr = - CreateTempAlloca(ConvertTypeForMem(MemFnExpr->getType()), "mem.fn"); + llvm::Value *MemFnPtr = CreateMemTemp(MemFnExpr->getType(), "mem.fn"); EmitAggExpr(MemFnExpr, MemFnPtr, /*VolatileDest=*/false); // Emit the 'this' pointer. |
