diff options
author | John McCall <rjmccall@apple.com> | 2011-02-15 09:22:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-02-15 09:22:45 +0000 |
commit | e3dc1707b530dd264417390f1510c99c166eb103 (patch) | |
tree | 930defae9890f4e57bda489693591a534d17341e /clang/lib/CodeGen/CGDecl.cpp | |
parent | cd3858b103195a2fa1ff2a5221e34d0680584c73 (diff) | |
download | bcm5719-llvm-e3dc1707b530dd264417390f1510c99c166eb103.tar.gz bcm5719-llvm-e3dc1707b530dd264417390f1510c99c166eb103.zip |
Assorted cleanup:
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code
llvm-svn: 125562
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 44568bc2aa6..4dd788b7991 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -933,7 +933,6 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg, assert((isa<ParmVarDecl>(D) || isa<ImplicitParamDecl>(D)) && "Invalid argument to EmitParmDecl"); QualType Ty = D.getType(); - CanQualType CTy = getContext().getCanonicalType(Ty); llvm::Value *DeclPtr; // If this is an aggregate or variable sized value, reuse the input pointer. @@ -945,8 +944,9 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg, DeclPtr = CreateMemTemp(Ty, D.getName() + ".addr"); // Store the initial value into the alloca. - unsigned Alignment = getContext().getDeclAlign(&D).getQuantity(); - EmitStoreOfScalar(Arg, DeclPtr, CTy.isVolatileQualified(), Alignment, Ty); + EmitStoreOfScalar(Arg, DeclPtr, Ty.isVolatileQualified(), + getContext().getDeclAlign(&D).getQuantity(), Ty, + CGM.getTBAAInfo(Ty)); } Arg->setName(D.getName()); |