|
clang
5.0.0
|
#include "CodeGenFunction.h"#include "CGBlocks.h"#include "CGCleanup.h"#include "CGCUDARuntime.h"#include "CGCXXABI.h"#include "CGDebugInfo.h"#include "CGOpenMPRuntime.h"#include "CodeGenModule.h"#include "CodeGenPGO.h"#include "TargetInfo.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTLambda.h"#include "clang/AST/Decl.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/StmtCXX.h"#include "clang/AST/StmtObjC.h"#include "clang/Basic/Builtins.h"#include "clang/Basic/TargetInfo.h"#include "clang/CodeGen/CGFunctionInfo.h"#include "clang/Frontend/CodeGenOptions.h"#include "clang/Sema/SemaDiagnostic.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/MDBuilder.h"#include "llvm/IR/Operator.h"#include "clang/AST/TypeNodes.def"Go to the source code of this file.
Macros | |
| #define | TYPE(name, parent) |
| #define | ABSTRACT_TYPE(name, parent) |
| #define | NON_CANONICAL_TYPE(name, parent) case Type::name: |
| #define | DEPENDENT_TYPE(name, parent) case Type::name: |
| #define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(name, parent) case Type::name: |
| #define | TYPE(Class, Base) |
| #define | ABSTRACT_TYPE(Class, Base) |
| #define | NON_CANONICAL_TYPE(Class, Base) |
| #define | DEPENDENT_TYPE(Class, Base) case Type::Class: |
| #define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) |
Functions | |
| static bool | shouldEmitLifetimeMarkers (const CodeGenOptions &CGOpts, const LangOptions &LangOpts) |
| shouldEmitLifetimeMarkers - Decide whether we need emit the life-time markers. More... | |
| static void | EmitIfUsed (CodeGenFunction &CGF, llvm::BasicBlock *BB) |
| static void | removeImageAccessQualifier (std::string &TyName) |
| static unsigned | ArgInfoAddressSpace (unsigned LangAS) |
| static void | GenOpenCLArgMetadata (const FunctionDecl *FD, llvm::Function *Fn, CodeGenModule &CGM, llvm::LLVMContext &Context, CGBuilderTy &Builder, ASTContext &ASTCtx) |
| static bool | endsWithReturn (const Decl *F) |
| Determine whether the function F ends with a return stmt. More... | |
| static void | markAsIgnoreThreadCheckingAtRuntime (llvm::Function *Fn) |
| static void | TryMarkNoThrow (llvm::Function *F) |
| Tries to mark the given function nounwind based on the non-existence of any throwing calls within it. More... | |
| static bool | shouldUseUndefinedBehaviorReturnOptimization (const FunctionDecl *FD, const ASTContext &Context) |
| static void | emitNonZeroVLAInit (CodeGenFunction &CGF, QualType baseType, Address dest, Address src, llvm::Value *sizeInChars) |
| emitNonZeroVLAInit - Emit the "zero" initialization of a variable-length array whose elements have a non-zero bit-pattern. More... | |
| static bool | hasRequiredFeatures (const SmallVectorImpl< StringRef > &ReqFeatures, CodeGenModule &CGM, const FunctionDecl *FD, std::string &FirstMissing) |
| #define ABSTRACT_TYPE | ( | name, | |
| parent | |||
| ) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Base | |||
| ) |
| #define DEPENDENT_TYPE | ( | name, | |
| parent | |||
| ) | case Type::name: |
| #define DEPENDENT_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define NON_CANONICAL_TYPE | ( | name, | |
| parent | |||
| ) | case Type::name: |
| #define NON_CANONICAL_TYPE | ( | Class, | |
| Base | |||
| ) |
| #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( | name, | |
| parent | |||
| ) | case Type::name: |
| #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( | Class, | |
| Base | |||
| ) |
| #define TYPE | ( | name, | |
| parent | |||
| ) |
| #define TYPE | ( | Class, | |
| Base | |||
| ) |
Definition at line 483 of file CodeGenFunction.cpp.
References clang::LangAS::opencl_constant, clang::LangAS::opencl_generic, clang::LangAS::opencl_global, and clang::LangAS::opencl_local.
Referenced by GenOpenCLArgMetadata().
|
static |
Definition at line 293 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenFunction::CurFn.
Referenced by clang::CodeGen::CodeGenFunction::FinishFunction().
|
static |
emitNonZeroVLAInit - Emit the "zero" initialization of a variable-length array whose elements have a non-zero bit-pattern.
| baseType | the inner-most element type of the array |
| src | - a char* pointing to the bit-pattern for a single base element of the array |
| sizeInChars | - the total size of the VLA, in chars |
Definition at line 1571 of file CodeGenFunction.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::CodeGen::CodeGenFunction::Builder, Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenFunction::getContext(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitNullInitialization().
Determine whether the function F ends with a return stmt.
Definition at line 704 of file CodeGenFunction.cpp.
References clang::FunctionDecl::getBody().
Referenced by clang::CodeGen::CodeGenFunction::StartFunction().
|
static |
Definition at line 497 of file CodeGenFunction.cpp.
References ArgInfoAddressSpace(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::QualType::getAsString(), clang::Decl::getAttr(), clang::QualType::getCanonicalType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::NamedDecl::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::ASTContext::getPrintingPolicy(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::QualType::isCanonical(), clang::QualType::isConstQualified(), clang::Type::isImageType(), clang::Type::isPipeType(), clang::Type::isPointerType(), clang::QualType::isRestrictQualified(), clang::QualType::isVolatileQualified(), clang::LangAS::opencl_constant, clang::LangAS::opencl_global, and removeImageAccessQualifier().
|
static |
Definition at line 2104 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenModule::getFunctionFeatureMap().
Referenced by clang::CodeGen::CodeGenFunction::checkTargetFeatures().
|
static |
Definition at line 719 of file CodeGenFunction.cpp.
Referenced by clang::CodeGen::CodeGenFunction::StartFunction().
|
static |
Definition at line 457 of file CodeGenFunction.cpp.
Referenced by GenOpenCLArgMetadata().
|
static |
shouldEmitLifetimeMarkers - Decide whether we need emit the life-time markers.
Definition at line 44 of file CodeGenFunction.cpp.
References clang::SanitizerSet::has(), and clang::LangOptions::Sanitize.
|
static |
Definition at line 1122 of file CodeGenFunction.cpp.
References clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::FunctionDecl::getReturnType(), and clang::QualType::isTriviallyCopyableType().
Referenced by clang::CodeGen::CodeGenFunction::GenerateCode().
|
static |
Tries to mark the given function nounwind based on the non-existence of any throwing calls within it.
We believe this is lightweight enough to do at -O0.
Definition at line 1065 of file CodeGenFunction.cpp.
References I.
Referenced by clang::CodeGen::CodeGenFunction::GenerateCode().
1.8.6