From 09a9b6e33524a9dc1c23f38adb146f61b64b8ff0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 28 Mar 2009 03:24:54 +0000 Subject: Move where block-related variables are initialized so that block types don't get generated when blocks aren't used. llvm-svn: 67898 --- clang/lib/CodeGen/CodeGenFunction.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 1d9f0f8..68d10ff 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -29,16 +29,6 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm) DebugInfo(0), SwitchInsn(0), CaseRangeBlock(0), InvokeDest(0) { LLVMIntTy = ConvertType(getContext().IntTy); LLVMPointerWidth = Target.getPointerWidth(0); - - // FIXME: We need to rearrange the code for copy/dispose so we have this - // sooner, so we can calculate offsets correctly. - if (!BlockHasCopyDispose) - BlockOffset = CGM.getTargetData() - .getTypeStoreSizeInBits(CGM.getGenericBlockLiteralType()) / 8; - else - BlockOffset = CGM.getTargetData() - .getTypeStoreSizeInBits(CGM.getGenericExtendedBlockLiteralType()) / 8; - BlockAlign = getContext().getTypeAlign(getContext().VoidPtrTy) / 8; } ASTContext &CodeGenFunction::getContext() const { -- cgit v1.1