#include #include ">

clang: lib/CodeGen/CGVTables.cpp File Reference (original) (raw)

#include "[CGCXXABI.h](CGCXXABI%5F8h%5Fsource.html)"
#include "[CodeGenFunction.h](CodeGenFunction%5F8h%5Fsource.html)"
#include "[CodeGenModule.h](CodeGenModule%5F8h%5Fsource.html)"
#include "[clang/AST/Attr.h](AST%5F2Attr%5F8h%5Fsource.html)"
#include "[clang/AST/CXXInheritance.h](CXXInheritance%5F8h%5Fsource.html)"
#include "[clang/AST/RecordLayout.h](RecordLayout%5F8h%5Fsource.html)"
#include "[clang/Basic/CodeGenOptions.h](CodeGenOptions%5F8h%5Fsource.html)"
#include "[clang/CodeGen/CGFunctionInfo.h](CGFunctionInfo%5F8h%5Fsource.html)"
#include "[clang/CodeGen/ConstantInitBuilder.h](ConstantInitBuilder%5F8h%5Fsource.html)"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include <algorithm>
#include <cstdio>
#include <utility>

Go to the source code of this file.

Functions
static void setThunkProperties (CodeGenModule &CGM, const ThunkInfo &Thunk, llvm::Function *ThunkFn, bool ForVTable, GlobalDecl GD)
static bool similar (const ABIArgInfo &infoL, CanQualType typeL, const ABIArgInfo &infoR, CanQualType typeR)
static RValue PerformReturnAdjustment (CodeGenFunction &CGF, QualType ResultType, RValue RV, const ThunkInfo &Thunk)
static void resolveTopLevelMetadata (llvm::Function *Fn, llvm::ValueToValueMapTy &VMap)
This function clones a function's DISubprogram node and enters it into a value map with the intent that the map can be utilized by the cloner to short-circuit Metadata node mapping.
static bool shouldEmitVTableThunk (CodeGenModule &CGM, const CXXMethodDecl *MD, bool IsUnprototyped, bool ForVTable)
static bool UseRelativeLayout (const CodeGenModule &CGM)
static void AddPointerLayoutOffset (const CodeGenModule &CGM, ConstantArrayBuilder &builder, CharUnits offset)
static void AddRelativeLayoutOffset (const CodeGenModule &CGM, ConstantArrayBuilder &builder, CharUnits offset)
static bool shouldEmitAvailableExternallyVTable (const CodeGenModule &CGM, const CXXRecordDecl *RD)
static bool shouldEmitVTableAtEndOfTranslationUnit (CodeGenModule &CGM, const CXXRecordDecl *RD)
Given that we're currently at the end of the translation unit, and we've emitted a reference to the vtable for this class, should we define that vtable?

AddPointerLayoutOffset()

AddRelativeLayoutOffset()

PerformReturnAdjustment()

Definition at line 69 of file CGVTables.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateIsNull(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::RValue::get(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Type::getPointeeType(), clang::CodeGen::RValue::getScalarVal(), IsNull, clang::Type::isReferenceType(), clang::CodeGen::CGCXXABI::performReturnAdjustment(), and clang::ThunkInfo::Return.

resolveTopLevelMetadata()

static void resolveTopLevelMetadata ( llvm::Function * Fn, llvm::ValueToValueMapTy & VMap ) static

This function clones a function's DISubprogram node and enters it into a value map with the intent that the map can be utilized by the cloner to short-circuit Metadata node mapping.

Furthermore, the function resolves any DILocalVariable nodes referenced by dbg.value intrinsics so they can be properly mapped during cloning.

Definition at line 120 of file CGVTables.cpp.

setThunkProperties()

shouldEmitAvailableExternallyVTable()

shouldEmitVTableAtEndOfTranslationUnit()

shouldEmitVTableThunk()

similar()

UseRelativeLayout()