summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-21 02:24:36 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-21 02:24:36 +0000
commit0381634a61fa2fa762de92326936c583acb5d703 (patch)
tree388086c1752242f32cef63ead12744469697cde7 /clang/lib/CodeGen/CGException.cpp
parent0b76a2c21f18e78c47f2eef92256debc3a035e54 (diff)
downloadbcm5719-llvm-0381634a61fa2fa762de92326936c583acb5d703.tar.gz
bcm5719-llvm-0381634a61fa2fa762de92326936c583acb5d703.zip
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. llvm-svn: 111707
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index d4a702a255f..7fb616e5a15 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud