//===------- CGObjCGNU.cpp - Emit LLVM Code from ASTs for a Module --------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This provides Objective-C code generation targetting the GNU runtime. The// class in this file generates structures used by the GNU Objective-C runtime// library. These structures are defined in objc/objc.h and objc/objc-api.h in// the GNU runtime distribution.////===----------------------------------------------------------------------===//#include"CGObjCRuntime.h"#include"CodeGenModule.h"#include"CodeGenFunction.h"#include"clang/AST/ASTContext.h"#include"clang/AST/Decl.h"#include"clang/AST/DeclObjC.h"#include"clang/AST/RecordLayout.h"#include"clang/AST/StmtObjC.h"#include"llvm/Intrinsics.h"#include"llvm/Module.h"#include"llvm/ADT/SmallVector.h"#include"llvm/ADT/StringMap.h"#include"llvm/Support/Compiler.h"#include"llvm/Target/TargetData.h"#include<map>usingnamespaceclang;usingnamespaceCodeGen;usingllvm::dyn_cast;// The version of the runtime that this class targets. Must match the version// in the runtime.staticconstintRuntimeVersion=8;staticconstintProtocolVersion=2;namespace{classCGObjCGNU:publicCodeGen::CGObjCRuntime{private:CodeGen::CodeGenModule&CGM;llvm::Module&TheModule;constllvm::PointerType*SelectorTy;constllvm::PointerType*PtrToInt8Ty;constllvm::FunctionType*IMPTy;constllvm::PointerType*IdTy;constllvm::IntegerType*IntTy;constllvm::PointerType*PtrTy;constllvm::IntegerType*LongTy