aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-15 09:22:45 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-15 09:22:45 +0000
commit5936e33bf74dd6bf126ceee0f6169a2593d03a69 (patch)
tree3164dc30585d3d19d444998cfaed95b1530357c3 /lib/CodeGen/CodeGenFunction.cpp
parent718b01d077748989f860bd21ee3402852ed0ed86 (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/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 39aff78c73..ee8b98cdd4 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -29,8 +29,8 @@ using namespace clang;
using namespace CodeGen;
CodeGenFunction::CodeGenFunction(CodeGenModule &cgm)
- : CGM(cgm), Target(CGM.getContext().Target),
- Builder(cgm.getModule().getContext()),
+ : CodeGenTypeCache(cgm), CGM(cgm),
+ Target(CGM.getContext().Target), Builder(cgm.getModule().getContext()),
BlockInfo(0), BlockPointer(0),
NormalCleanupDest(0), EHCleanupDest(0), NextCleanupDestIndex(1),
ExceptionSlot(0), DebugInfo(0), IndirectBranch(0),
@@ -40,14 +40,6 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm)
OutermostConditional(0), TerminateLandingPad(0), TerminateHandler(0),
TrapBB(0) {
- // Get some frequently used types.
- LLVMPointerWidth = Target.getPointerWidth(0);
- llvm::LLVMContext &LLVMContext = CGM.getLLVMContext();
- IntPtrTy = llvm::IntegerType::get(LLVMContext, LLVMPointerWidth);
- Int32Ty = llvm::Type::getInt32Ty(LLVMContext);
- Int64Ty = llvm::Type::getInt64Ty(LLVMContext);
- Int8PtrTy = cgm.Int8PtrTy;
-
Exceptions = getContext().getLangOptions().Exceptions;
CatchUndefined = getContext().getLangOptions().CatchUndefined;
CGM.getCXXABI().getMangleContext().startNewFunction();