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 | 5936e33bf74dd6bf126ceee0f6169a2593d03a69 (patch) | |
tree | 3164dc30585d3d19d444998cfaed95b1530357c3 /lib/CodeGen/CGDecl.cpp | |
parent | 718b01d077748989f860bd21ee3402852ed0ed86 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 44568bc2aa..4dd788b799 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/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()); |