clang  13.0.0git
Functions
CGDeclCXX.cpp File Reference
#include "CGCXXABI.h"
#include "CGObjCRuntime.h"
#include "CGOpenMPRuntime.h"
#include "CodeGenFunction.h"
#include "TargetInfo.h"
#include "clang/AST/Attr.h"
#include "clang/Basic/LangOptions.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/Support/Path.h"
Include dependency graph for CGDeclCXX.cpp:

Go to the source code of this file.

Functions

static void EmitDeclInit (CodeGenFunction &CGF, const VarDecl &D, ConstantAddress DeclPtr)
 
static void EmitDeclDestroy (CodeGenFunction &CGF, const VarDecl &D, ConstantAddress Addr)
 Emit code to cause the destruction of the given variable with static storage duration. More...
 
static void EmitDeclInvariant (CodeGenFunction &CGF, const VarDecl &D, llvm::Constant *Addr)
 Emit code to cause the variable at the given address to be considered as constant from this point onwards. More...
 
static SmallString< 128 > getTransformedFileName (llvm::Module &M)
 
static std::string getPrioritySuffix (unsigned int Priority)
 

Function Documentation

◆ EmitDeclDestroy()

static void EmitDeclDestroy ( CodeGenFunction CGF,
const VarDecl D,
ConstantAddress  Addr 
)
static

Emit code to cause the destruction of the given variable with static storage duration.

Definition at line 70 of file CGDeclCXX.cpp.

References clang::CodeGen::CGCXXABI::canCallMismatchedFunctionType(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_nontrivial_c_struct, clang::QualType::DK_objc_strong_lifetime, clang::QualType::DK_objc_weak_lifetime, clang::Dtor_Complete, clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::CodeGen::CodeGenModule::getAddrAndTypeOfCXXStructor(), clang::Qualifiers::getAddressSpace(), clang::CodeGen::TargetCodeGenInfo::getAddrSpaceOfCxaAtexitPtrParam(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenFunction::getDestroyer(), clang::CXXRecordDecl::getDestructor(), clang::ASTContext::getLangOpts(), clang::CodeGen::ConstantAddress::getPointer(), clang::QualType::getQualifiers(), clang::ASTContext::getTargetAddressSpace(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::VarDecl::getTLSKind(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenFunction::getTypes(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::VarDecl::needsDestruction(), clang::CodeGen::CodeGenFunction::needsEHCleanup(), and clang::CodeGen::CGCXXABI::registerGlobalDtor().

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit().

◆ EmitDeclInit()

static void EmitDeclInit ( CodeGenFunction CGF,
const VarDecl D,
ConstantAddress  DeclPtr 
)
static

◆ EmitDeclInvariant()

static void EmitDeclInvariant ( CodeGenFunction CGF,
const VarDecl D,
llvm::Constant *  Addr 
)
static

Emit code to cause the variable at the given address to be considered as constant from this point onwards.

Definition at line 150 of file CGDeclCXX.cpp.

References clang::CodeGen::CodeGenFunction::EmitInvariantStart(), clang::CodeGen::CodeGenFunction::getContext(), clang::ValueDecl::getType(), and clang::ASTContext::getTypeSizeInChars().

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit().

◆ getPrioritySuffix()

static std::string getPrioritySuffix ( unsigned int  Priority)
static

Definition at line 570 of file CGDeclCXX.cpp.

References Priority, and string().

◆ getTransformedFileName()

static SmallString<128> getTransformedFileName ( llvm::Module &  M)
static

Definition at line 554 of file CGDeclCXX.cpp.

References clang::isPreprocessingNumberBody().