diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 7889d089074..98fc9ade733 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -201,7 +201,7 @@ public: Address UB)> CodeGenDispatchBoundsTy; - /// \brief CGBuilder insert helper. This function is called after an + /// CGBuilder insert helper. This function is called after an /// instruction is created using Builder. void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock *BB, @@ -255,7 +255,7 @@ public: /// we prefer to insert allocas. llvm::AssertingVH<llvm::Instruction> AllocaInsertPt; - /// \brief API for captured statement code generation. + /// API for captured statement code generation. class CGCapturedStmtInfo { public: explicit CGCapturedStmtInfo(CapturedRegionKind K = CR_Default) @@ -283,10 +283,10 @@ public: CapturedRegionKind getKind() const { return Kind; } virtual void setContextValue(llvm::Value *V) { ThisValue = V; } - // \brief Retrieve the value of the context parameter. + // Retrieve the value of the context parameter. virtual llvm::Value *getContextValue() const { return ThisValue; } - /// \brief Lookup the captured field decl for a variable. + /// Lookup the captured field decl for a variable. virtual const FieldDecl *lookup(const VarDecl *VD) const { return CaptureFields.lookup(VD->getCanonicalDecl()); } @@ -298,32 +298,32 @@ public: return true; } - /// \brief Emit the captured statement body. + /// Emit the captured statement body. virtual void EmitBody(CodeGenFunction &CGF, const Stmt *S) { CGF.incrementProfileCounter(S); CGF.EmitStmt(S); } - /// \brief Get the name of the capture helper. + /// Get the name of the capture helper. virtual StringRef getHelperName() const { return "__captured_stmt"; } private: - /// \brief The kind of captured statement being generated. + /// The kind of captured statement being generated. CapturedRegionKind Kind; - /// \brief Keep the map between VarDecl and FieldDecl. + /// Keep the map between VarDecl and FieldDecl. llvm::SmallDenseMap<const VarDecl *, FieldDecl *> CaptureFields; - /// \brief The base address of the captured record, passed in as the first + /// The base address of the captured record, passed in as the first /// argument of the parallel region function. llvm::Value *ThisValue; - /// \brief Captured 'this' type. + /// Captured 'this' type. FieldDecl *CXXThisFieldDecl; }; CGCapturedStmtInfo *CapturedStmtInfo; - /// \brief RAII for correct setting/restoring of CapturedStmtInfo. + /// RAII for correct setting/restoring of CapturedStmtInfo. class CGCapturedStmtRAII { private: CodeGenFunction &CGF; @@ -362,13 +362,13 @@ public: } }; - /// \brief Sanitizers enabled for this function. + /// Sanitizers enabled for this function. SanitizerSet SanOpts; - /// \brief True if CodeGen currently emits code implementing sanitizer checks. + /// True if CodeGen currently emits code implementing sanitizer checks. bool IsSanitizerScope; - /// \brief RAII object to set/unset CodeGenFunction::IsSanitizerScope. + /// RAII object to set/unset CodeGenFunction::IsSanitizerScope. class SanitizerScope { CodeGenFunction *CGF; public: @@ -399,7 +399,7 @@ public: llvm::DenseMap<const VarDecl *, FieldDecl *> LambdaCaptureFields; FieldDecl *LambdaThisCaptureField; - /// \brief A mapping from NRVO variables to the flags used to indicate + /// A mapping from NRVO variables to the flags used to indicate /// when the NRVO has been applied to this variable. llvm::DenseMap<const VarDecl *, llvm::Value *> NRVOFlags; @@ -525,7 +525,7 @@ public: initFullExprCleanup(); } - /// \brief Queue a cleanup to be pushed after finishing the current + /// Queue a cleanup to be pushed after finishing the current /// full-expression. template <class T, class... As> void pushCleanupAfterFullExpr(CleanupKind Kind, As... A) { @@ -584,7 +584,7 @@ public: void ActivateCleanupBlock(EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP); - /// \brief Enters a new scope for capturing cleanups, all of which + /// Enters a new scope for capturing cleanups, all of which /// will be executed once the scope is exited. class RunCleanupsScope { EHScopeStack::stable_iterator CleanupStackDepth, OldCleanupScopeDepth; @@ -601,7 +601,7 @@ public: CodeGenFunction& CGF; public: - /// \brief Enter a new cleanup scope. + /// Enter a new cleanup scope. explicit RunCleanupsScope(CodeGenFunction &CGF) : PerformCleanup(true), CGF(CGF) { @@ -614,18 +614,18 @@ public: CGF.CurrentCleanupScopeDepth = CleanupStackDepth; } - /// \brief Exit this cleanup scope, emitting any accumulated cleanups. + /// Exit this cleanup scope, emitting any accumulated cleanups. ~RunCleanupsScope() { if (PerformCleanup) ForceCleanup(); } - /// \brief Determine whether this scope requires any cleanups. + /// Determine whether this scope requires any cleanups. bool requiresCleanups() const { return CGF.EHStack.stable_begin() != CleanupStackDepth; } - /// \brief Force the emission of cleanups now, instead of waiting + /// Force the emission of cleanups now, instead of waiting /// until this object is destroyed. /// \param ValuesToReload - A list of values that need to be available at /// the insertion point after cleanup emission. If cleanup emission created @@ -654,7 +654,7 @@ public: void operator=(const LexicalScope &) = delete; public: - /// \brief Enter a new cleanup scope. + /// Enter a new cleanup scope. explicit LexicalScope(CodeGenFunction &CGF, SourceRange Range) : RunCleanupsScope(CGF), Range(Range), ParentScope(CGF.CurLexicalScope) { CGF.CurLexicalScope = this; @@ -667,7 +667,7 @@ public: Labels.push_back(label); } - /// \brief Exit this cleanup scope, emitting any accumulated + /// Exit this cleanup scope, emitting any accumulated /// cleanups. ~LexicalScope() { if (CGDebugInfo *DI = CGF.getDebugInfo()) @@ -681,7 +681,7 @@ public: } } - /// \brief Force the emission of cleanups now, instead of waiting + /// Force the emission of cleanups now, instead of waiting /// until this object is destroyed. void ForceCleanup() { CGF.CurLexicalScope = ParentScope; @@ -828,13 +828,13 @@ public: } }; - /// \brief Takes the old cleanup stack size and emits the cleanup blocks + /// Takes the old cleanup stack size and emits the cleanup blocks /// that have been added. void PopCleanupBlocks(EHScopeStack::stable_iterator OldCleanupStackSize, std::initializer_list<llvm::Value **> ValuesToReload = {}); - /// \brief Takes the old cleanup stack size and emits the cleanup blocks + /// Takes the old cleanup stack size and emits the cleanup blocks /// that have been added, then adds all lifetime-extended cleanups from /// the given position to the stack. void @@ -1667,7 +1667,7 @@ public: void GenerateCode(GlobalDecl GD, llvm::Function *Fn, const CGFunctionInfo &FnInfo); - /// \brief Emit code for the start of a function. + /// Emit code for the start of a function. /// \param Loc The location to be associated with the function. /// \param StartLoc The location of the function body. void StartFunction(GlobalDecl GD, @@ -1693,7 +1693,7 @@ public: void EmitLambdaStaticInvokeBody(const CXXMethodDecl *MD); void EmitAsanPrologueOrEpilogue(bool Prologue); - /// \brief Emit the unified return block, trying to avoid its emission when + /// Emit the unified return block, trying to avoid its emission when /// possible. /// \return The debug location of the user written return statement if the /// return block is is avoided. @@ -1766,7 +1766,7 @@ public: CFITCK_ICall, }; - /// \brief Derived is the presumed address of an object of type T after a + /// Derived is the presumed address of an object of type T after a /// cast. If T is a polymorphic class type, emit a check that the virtual /// table for Derived belongs to a class derived from T. void EmitVTablePtrCheckForCast(QualType T, llvm::Value *Derived, @@ -2406,7 +2406,7 @@ public: llvm::Value *EmitDynamicCast(Address V, const CXXDynamicCastExpr *DCE); Address EmitCXXUuidofExpr(const CXXUuidofExpr *E); - /// \brief Situations in which we might emit a check for the suitability of a + /// Situations in which we might emit a check for the suitability of a /// pointer or glvalue. enum TypeCheckKind { /// Checking the operand of a load. Must be suitably sized and aligned. @@ -2450,17 +2450,17 @@ public: /// Determine whether the pointer type check \p TCK requires a vptr check. static bool isVptrCheckRequired(TypeCheckKind TCK, QualType Ty); - /// \brief Whether any type-checking sanitizers are enabled. If \c false, + /// Whether any type-checking sanitizers are enabled. If \c false, /// calls to EmitTypeCheck can be skipped. bool sanitizePerformTypeCheck() const; - /// \brief Emit a check that \p V is the address of storage of the + /// Emit a check that \p V is the address of storage of the /// appropriate size and alignment for an object of type \p Type. void EmitTypeCheck(TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V, QualType Type, CharUnits Alignment = CharUnits::Zero(), SanitizerSet SkippedChecks = SanitizerSet()); - /// \brief Emit a check that \p Base points into an array object, which + /// Emit a check that \p Base points into an array object, which /// we can access at index \p Index. \p Accessed should be \c false if we /// this expression is used as an lvalue, for instance in "&Arr[Idx]". void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index, @@ -2501,7 +2501,7 @@ public: typedef void SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address); - /// \brief Determine whether the given initializer is trivial in the sense + /// Determine whether the given initializer is trivial in the sense /// that it requires no code to be generated. bool isTrivialInitializer(const Expr *Init); @@ -2776,7 +2776,7 @@ public: SmallVectorImpl<llvm::Value *> &CapturedVars); void emitOMPSimpleStore(LValue LVal, RValue RVal, QualType RValTy, SourceLocation Loc); - /// \brief Perform element by element copying of arrays with type \a + /// Perform element by element copying of arrays with type \a /// OriginalType from \a SrcAddr to \a DestAddr using copying procedure /// generated by \a CopyGen. /// @@ -2788,7 +2788,7 @@ public: void EmitOMPAggregateAssign( Address DestAddr, Address SrcAddr, QualType OriginalType, const llvm::function_ref<void(Address, Address)> CopyGen); - /// \brief Emit proper copying of data from one variable to another. + /// Emit proper copying of data from one variable to another. /// /// \param OriginalType Original type of the copied variables. /// \param DestAddr Destination address. @@ -2803,7 +2803,7 @@ public: Address DestAddr, Address SrcAddr, const VarDecl *DestVD, const VarDecl *SrcVD, const Expr *Copy); - /// \brief Emit atomic update code for constructs: \a X = \a X \a BO \a E or + /// Emit atomic update code for constructs: \a X = \a X \a BO \a E or /// \a X = \a E \a BO \a E. /// /// \param X Value to be updated. @@ -2827,7 +2827,7 @@ public: void EmitOMPUseDevicePtrClause( const OMPClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap<const ValueDecl *, Address> &CaptureDeviceAddrMap); - /// \brief Emit code for copyin clause in \a D directive. The next code is + /// Emit code for copyin clause in \a D directive. The next code is /// generated at the start of outlined functions for directives: /// \code /// threadprivate_var1 = master_threadprivate_var1; @@ -2839,7 +2839,7 @@ public: /// \param D OpenMP directive possibly with 'copyin' clause(s). /// \returns true if at least one copyin variable is found, false otherwise. bool EmitOMPCopyinClause(const OMPExecutableDirective &D); - /// \brief Emit initial code for lastprivate variables. If some variable is + /// Emit initial code for lastprivate variables. If some variable is /// not also firstprivate, then the default initialization is used. Otherwise /// initialization of this variable is performed by EmitOMPFirstprivateClause /// method. @@ -2852,7 +2852,7 @@ public: /// otherwise. bool EmitOMPLastprivateClauseInit(const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope); - /// \brief Emit final copying of lastprivate values to original variables at + /// Emit final copying of lastprivate values to original variables at /// the end of the worksharing or simd directive. /// /// \param D Directive that has at least one 'lastprivate' directives. @@ -2871,7 +2871,7 @@ public: void EmitOMPLinearClauseFinal( const OMPLoopDirective &D, const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen); - /// \brief Emit initial code for reduction variables. Creates reduction copies + /// Emit initial code for reduction variables. Creates reduction copies /// and initializes them with the values according to OpenMP standard. /// /// \param D Directive (possibly) with the 'reduction' clause. @@ -2880,14 +2880,14 @@ public: /// void EmitOMPReductionClauseInit(const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope); - /// \brief Emit final update of reduction values to original variables at + /// Emit final update of reduction values to original variables at /// the end of the directive. /// /// \param D Directive that has at least one 'reduction' directives. /// \param ReductionKind The kind of reduction to perform. void EmitOMPReductionClauseFinal(const OMPExecutableDirective &D, const OpenMPDirectiveKind ReductionKind); - /// \brief Emit initial code for linear variables. Creates private copies + /// Emit initial code for linear variables. Creates private copies /// and initializes them with the values according to OpenMP standard. /// /// \param D Directive (possibly) with the 'linear' clause. @@ -3019,7 +3019,7 @@ public: static void EmitOMPTargetTeamsDistributeParallelForDeviceFunction( CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForDirective &S); - /// \brief Emit inner loop of the worksharing/simd construct. + /// Emit inner loop of the worksharing/simd construct. /// /// \param S Directive, for which the inner loop must be emitted. /// \param RequiresCleanup true, if directive has some associated private @@ -3043,7 +3043,7 @@ public: /// Helper for the OpenMP loop directives. void EmitOMPLoopBody(const OMPLoopDirective &D, JumpDest LoopExit); - /// \brief Emit code for the worksharing loop-based directive. + /// Emit code for the worksharing loop-based directive. /// \return true, if this construct has any lastprivate clause, false - /// otherwise. bool EmitOMPWorksharingLoop(const OMPLoopDirective &S, Expr *EUB, @@ -3116,7 +3116,7 @@ private: OMPPrivateScope &LoopScope, const OMPLoopArguments &LoopArgs, const CodeGenLoopTy &CodeGenLoopContent); - /// \brief Emit code for sections directive. + /// Emit code for sections directive. void EmitSections(const OMPExecutableDirective &S); public: @@ -3157,7 +3157,7 @@ public: /// LValue EmitLValue(const Expr *E); - /// \brief Same as EmitLValue but additionally we generate checking code to + /// Same as EmitLValue but additionally we generate checking code to /// guard against undefined behavior. This is only suitable when we know /// that the address will be used to access the object. LValue EmitCheckedLValue(const Expr *E, TypeCheckKind TCK); @@ -3634,7 +3634,7 @@ public: void EmitObjCAutoreleasePoolCleanup(llvm::Value *Ptr); void EmitObjCMRRAutoreleasePoolPop(llvm::Value *Ptr); - /// \brief Emits a reference binding to the passed in expression. + /// Emits a reference binding to the passed in expression. RValue EmitReferenceBindingToExpr(const Expr *E); //===--------------------------------------------------------------------===// @@ -3851,26 +3851,26 @@ public: /// enabled, a runtime check specified by \p Kind is also emitted. llvm::Value *EmitCheckedArgForBuiltin(const Expr *E, BuiltinCheckKind Kind); - /// \brief Emit a description of a type in a format suitable for passing to + /// Emit a description of a type in a format suitable for passing to /// a runtime sanitizer handler. llvm::Constant *EmitCheckTypeDescriptor(QualType T); - /// \brief Convert a value into a format suitable for passing to a runtime + /// Convert a value into a format suitable for passing to a runtime /// sanitizer handler. llvm::Value *EmitCheckValue(llvm::Value *V); - /// \brief Emit a description of a source location in a format suitable for + /// Emit a description of a source location in a format suitable for /// passing to a runtime sanitizer handler. llvm::Constant *EmitCheckSourceLocation(SourceLocation Loc); - /// \brief Create a basic block that will call a handler function in a + /// Create a basic block that will call a handler function in a /// sanitizer runtime with the provided arguments, and create a conditional /// branch to it. void EmitCheck(ArrayRef<std::pair<llvm::Value *, SanitizerMask>> Checked, SanitizerHandler Check, ArrayRef<llvm::Constant *> StaticArgs, ArrayRef<llvm::Value *> DynamicArgs); - /// \brief Emit a slow path cross-DSO CFI check which calls __cfi_slowpath + /// Emit a slow path cross-DSO CFI check which calls __cfi_slowpath /// if Cond if false. void EmitCfiSlowPathCheck(SanitizerMask Kind, llvm::Value *Cond, llvm::ConstantInt *TypeId, llvm::Value *Ptr, @@ -3880,21 +3880,21 @@ public: /// checking is enabled. Otherwise, just emit an unreachable instruction. void EmitUnreachable(SourceLocation Loc); - /// \brief Create a basic block that will call the trap intrinsic, and emit a + /// Create a basic block that will call the trap intrinsic, and emit a /// conditional branch to it, for the -ftrapv checks. void EmitTrapCheck(llvm::Value *Checked); - /// \brief Emit a call to trap or debugtrap and attach function attribute + /// Emit a call to trap or debugtrap and attach function attribute /// "trap-func-name" if specified. llvm::CallInst *EmitTrapCall(llvm::Intrinsic::ID IntrID); - /// \brief Emit a stub for the cross-DSO CFI check function. + /// Emit a stub for the cross-DSO CFI check function. void EmitCfiCheckStub(); - /// \brief Emit a cross-DSO CFI failure handling function. + /// Emit a cross-DSO CFI failure handling function. void EmitCfiCheckFail(); - /// \brief Create a check for a function parameter that may potentially be + /// Create a check for a function parameter that may potentially be /// declared as non-null. void EmitNonNullArgCheck(RValue RV, QualType ArgType, SourceLocation ArgLoc, AbstractCallee AC, unsigned ParmNum); @@ -3949,7 +3949,7 @@ private: std::string &ConstraintStr, SourceLocation Loc); - /// \brief Attempts to statically evaluate the object size of E. If that + /// Attempts to statically evaluate the object size of E. If that /// fails, emits code to figure the size of E out for us. This is /// pass_object_size aware. /// @@ -3958,7 +3958,7 @@ private: llvm::IntegerType *ResType, llvm::Value *EmittedE); - /// \brief Emits the size of E, as required by __builtin_object_size. This + /// Emits the size of E, as required by __builtin_object_size. This /// function is aware of pass_object_size parameters, and will act accordingly /// if E is a parameter with the pass_object_size attribute. llvm::Value *emitBuiltinObjectSize(const Expr *E, unsigned Type, |