CodeGenModule.h (204643) | CodeGenModule.h (204793) |
---|---|
1//===--- CodeGenModule.h - Per-Module state for LLVM CodeGen ----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 15 unchanged lines hidden (view full) --- 24#include "CGVtable.h" 25#include "CodeGenTypes.h" 26#include "GlobalDecl.h" 27#include "Mangle.h" 28#include "llvm/Module.h" 29#include "llvm/ADT/DenseMap.h" 30#include "llvm/ADT/StringMap.h" 31#include "llvm/ADT/StringSet.h" | 1//===--- CodeGenModule.h - Per-Module state for LLVM CodeGen ----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 15 unchanged lines hidden (view full) --- 24#include "CGVtable.h" 25#include "CodeGenTypes.h" 26#include "GlobalDecl.h" 27#include "Mangle.h" 28#include "llvm/Module.h" 29#include "llvm/ADT/DenseMap.h" 30#include "llvm/ADT/StringMap.h" 31#include "llvm/ADT/StringSet.h" |
32#include "llvm/ADT/SmallPtrSet.h" |
|
32#include "llvm/Support/ValueHandle.h" 33#include <list> 34 35namespace llvm { 36 class Module; 37 class Constant; 38 class Function; 39 class GlobalValue; --- 72 unchanged lines hidden (view full) --- 112 /// (which may change with attributes such as asm-labels). The key 113 /// to this map should be generated using getMangledName(). 114 /// 115 /// Note that this map always lines up exactly with the contents of the LLVM 116 /// IR symbol table, but this is quicker to query since it is doing uniqued 117 /// pointer lookups instead of full string lookups. 118 llvm::DenseMap<const char*, llvm::GlobalValue*> GlobalDeclMap; 119 | 33#include "llvm/Support/ValueHandle.h" 34#include <list> 35 36namespace llvm { 37 class Module; 38 class Constant; 39 class Function; 40 class GlobalValue; --- 72 unchanged lines hidden (view full) --- 113 /// (which may change with attributes such as asm-labels). The key 114 /// to this map should be generated using getMangledName(). 115 /// 116 /// Note that this map always lines up exactly with the contents of the LLVM 117 /// IR symbol table, but this is quicker to query since it is doing uniqued 118 /// pointer lookups instead of full string lookups. 119 llvm::DenseMap<const char*, llvm::GlobalValue*> GlobalDeclMap; 120 |
121 // WeakRefReferences - A set of references that have only been seen via 122 // a weakref so far. This is used to remove the weak of the reference if we ever 123 // see a direct reference or a definition. 124 llvm::SmallPtrSet<llvm::GlobalValue*, 10> WeakRefReferences; 125 |
|
120 /// \brief Contains the strings used for mangled names. 121 /// 122 /// FIXME: Eventually, this should map from the semantic/canonical 123 /// declaration for each global entity to its mangled name (if it 124 /// has one). 125 llvm::StringSet<> MangledNames; 126 127 /// DeferredDecls - This contains all the decls which have definitions but --- 65 unchanged lines hidden (view full) --- 193 llvm::Module &getModule() const { return TheModule; } 194 CodeGenTypes &getTypes() { return Types; } 195 MangleContext &getMangleContext() { return MangleCtx; } 196 CGVtableInfo &getVtableInfo() { return VtableInfo; } 197 Diagnostic &getDiags() const { return Diags; } 198 const llvm::TargetData &getTargetData() const { return TheTargetData; } 199 llvm::LLVMContext &getLLVMContext() { return VMContext; } 200 const TargetCodeGenInfo &getTargetCodeGenInfo() const; | 126 /// \brief Contains the strings used for mangled names. 127 /// 128 /// FIXME: Eventually, this should map from the semantic/canonical 129 /// declaration for each global entity to its mangled name (if it 130 /// has one). 131 llvm::StringSet<> MangledNames; 132 133 /// DeferredDecls - This contains all the decls which have definitions but --- 65 unchanged lines hidden (view full) --- 199 llvm::Module &getModule() const { return TheModule; } 200 CodeGenTypes &getTypes() { return Types; } 201 MangleContext &getMangleContext() { return MangleCtx; } 202 CGVtableInfo &getVtableInfo() { return VtableInfo; } 203 Diagnostic &getDiags() const { return Diags; } 204 const llvm::TargetData &getTargetData() const { return TheTargetData; } 205 llvm::LLVMContext &getLLVMContext() { return VMContext; } 206 const TargetCodeGenInfo &getTargetCodeGenInfo() const; |
207 bool isTargetDarwin() const; |
|
201 202 /// getDeclVisibilityMode - Compute the visibility of the decl \arg D. 203 LangOptions::VisibilityMode getDeclVisibilityMode(const Decl *D) const; 204 205 /// setGlobalVisibility - Set the visibility for the given LLVM 206 /// GlobalValue. 207 void setGlobalVisibility(llvm::GlobalValue *GV, const Decl *D) const; 208 --- 29 unchanged lines hidden (view full) --- 238 239 llvm::Constant *GetAddrOfThunk(GlobalDecl GD, 240 const ThunkAdjustment &ThisAdjustment); 241 llvm::Constant *GetAddrOfCovariantThunk(GlobalDecl GD, 242 const CovariantThunkAdjustment &ThisAdjustment); 243 void BuildThunksForVirtual(GlobalDecl GD); 244 void BuildThunksForVirtualRecursive(GlobalDecl GD, GlobalDecl BaseOGD); 245 | 208 209 /// getDeclVisibilityMode - Compute the visibility of the decl \arg D. 210 LangOptions::VisibilityMode getDeclVisibilityMode(const Decl *D) const; 211 212 /// setGlobalVisibility - Set the visibility for the given LLVM 213 /// GlobalValue. 214 void setGlobalVisibility(llvm::GlobalValue *GV, const Decl *D) const; 215 --- 29 unchanged lines hidden (view full) --- 245 246 llvm::Constant *GetAddrOfThunk(GlobalDecl GD, 247 const ThunkAdjustment &ThisAdjustment); 248 llvm::Constant *GetAddrOfCovariantThunk(GlobalDecl GD, 249 const CovariantThunkAdjustment &ThisAdjustment); 250 void BuildThunksForVirtual(GlobalDecl GD); 251 void BuildThunksForVirtualRecursive(GlobalDecl GD, GlobalDecl BaseOGD); 252 |
253 /// GetWeakRefReference - Get a reference to the target of VD. 254 llvm::Constant *GetWeakRefReference(const ValueDecl *VD); 255 |
|
246 /// BuildThunk - Build a thunk for the given method. 247 llvm::Constant *BuildThunk(GlobalDecl GD, bool Extern, 248 const ThunkAdjustment &ThisAdjustment); 249 250 /// BuildCoVariantThunk - Build a thunk for the given method 251 llvm::Constant * 252 BuildCovariantThunk(const GlobalDecl &GD, bool Extern, 253 const CovariantThunkAdjustment &Adjustment); --- 288 unchanged lines hidden --- | 256 /// BuildThunk - Build a thunk for the given method. 257 llvm::Constant *BuildThunk(GlobalDecl GD, bool Extern, 258 const ThunkAdjustment &ThisAdjustment); 259 260 /// BuildCoVariantThunk - Build a thunk for the given method 261 llvm::Constant * 262 BuildCovariantThunk(const GlobalDecl &GD, bool Extern, 263 const CovariantThunkAdjustment &Adjustment); --- 288 unchanged lines hidden --- |