//===-- CodeGenFunction.h - Per-Function state for LLVM CodeGen -*- C++ -*-===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This is the internal per-function state used for llvm translation.////===----------------------------------------------------------------------===//#ifndef CLANG_CODEGEN_CODEGENFUNCTION_H#define CLANG_CODEGEN_CODEGENFUNCTION_H#include"clang/AST/Type.h"#include"clang/AST/ExprCXX.h"#include"clang/AST/ExprObjC.h"#include"clang/AST/CharUnits.h"#include"clang/Basic/TargetInfo.h"#include"llvm/ADT/DenseMap.h"#include"llvm/ADT/SmallVector.h"#include"llvm/Support/ValueHandle.h"#include<map>#include"CodeGenModule.h"#include"CGBlocks.h"#include"CGBuilder.h"#include"CGCall.h"#include"CGCXX.h"#include"CGValue.h"namespacellvm{classBasicBlock;classLLVMContext;classModule;classSwitchInst;classTwine;classValue;}namespaceclang{classASTContext;classCXXDestructorDecl;classCXXTryStmt;classDecl;classEnumConstantDecl;classFunctionDecl;classFunctionProtoType;classLabelStmt;classObjCContainerDecl;classObjCInterfaceDecl;classObjCIvarDecl;classObjCMethodDecl;classObjCImplementationDecl;classObjCPropertyImplDecl;classTargetInfo;classVarDecl;classObjCForCollectionStmt;classObjCAtTryStmt;classObjCAtThrowStmt;classObjCAtSynchronizedStmt;namespaceCodeGen{classCodeGenModule;classCodeGenTypes;classCGDebugInfo;classCGFunctionInfo;classCGRecordLayout;/// CodeGenFunction - This class organizes the per-function state that is used/// while generating LLVM code.classCodeGenFunction:publicBlockFunction{CodeGenFunction(constCodeGenFunction&);// DO NOT IMPLEMENTvoidoperator=(constCodeGenFunction&);// DO NOT IMPLEMENTpublic:CodeGenModule&CGM;// Per-module state.constTargetInfo&Target;typedefstd::pair<llvm::Value*,llvm::Value*>ComplexPairTy;CGBuilderTyBuilder;/// CurFuncDecl - Holds the Decl for the current function or ObjC method./// This excludes BlockDecls.constDecl*CurFuncDecl;/// CurCodeDecl - This is the inner-most code context, which includes blocks.constDecl*CurCodeDecl;constCGFunctionInfo*CurFnInfo;QualTypeFnRetTy;llvm::Function*CurFn;/// CurGD - The GlobalDecl for the current function being compiled.GlobalDeclCurGD;/// OuterTryBlock - This is the address of the outter most try block, 0/// otherwise.constStmt*OuterTryBlock;/// ReturnBlock - Unified return block.