diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-21 02:24:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-21 02:24:36 +0000 |
commit | 91a16fa3265686b90054715eea504d9b4a13438b (patch) | |
tree | 1231112a41bba5d9569021926912372d6c1fe842 /lib/CodeGen/CGException.cpp | |
parent | 4cac2a157c5a3d7c8f6cd79b52e891184623f29e (diff) |
IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
update callers as best I can.
- This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
- Serious review appreciated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGException.cpp')
-rw-r--r-- | lib/CodeGen/CGException.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index d4a702a255..7fb616e5a1 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -1132,8 +1132,11 @@ static void InitCatchParam(CodeGenFunction &CGF, CGF.StoreComplexToAddr(CGF.LoadComplexFromAddr(Cast, /*volatile*/ false), ParamAddr, /*volatile*/ false); } else { + unsigned Alignment = + CGF.getContext().getDeclAlign(&CatchParam).getQuantity(); llvm::Value *ExnLoad = CGF.Builder.CreateLoad(Cast, "exn.scalar"); - CGF.EmitStoreOfScalar(ExnLoad, ParamAddr, /*volatile*/ false, CatchType); + CGF.EmitStoreOfScalar(ExnLoad, ParamAddr, /*volatile*/ false, Alignment, + CatchType); } return; } |