diff options
Diffstat (limited to 'clang/lib/CodeGen')
23 files changed, 47 insertions, 47 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 2eb8b6c7542..241fb5cd61f 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -821,7 +821,7 @@ static PassBuilder::OptimizationLevel mapToLevel(const CodeGenOptions &Opts) { case 2: switch (Opts.OptimizeSize) { default: - llvm_unreachable("Invalide optimization level for size!"); + llvm_unreachable("Invalid optimization level for size!"); case 0: return PassBuilder::O2; diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 4e57e6cd954..926683db93c 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -66,7 +66,7 @@ static llvm::Constant *buildDisposeHelper(CodeGenModule &CGM, /// buildBlockDescriptor - Build the block descriptor meta-data for a block. /// buildBlockDescriptor is accessed from 5th field of the Block_literal /// meta-data and contains stationary information about the block literal. -/// Its definition will have 4 (or optinally 6) words. +/// Its definition will have 4 (or optionally 6) words. /// \code /// struct Block_descriptor { /// unsigned long reserved; @@ -330,7 +330,7 @@ static void initializeForBlockHeader(CodeGenModule &CGM, CGBlockInfo &info, info.BlockSize = CharUnits::fromQuantity(Offset); } else { // The header is basically 'struct { void *; int; int; void *; void *; }'. - // Assert that that struct is packed. + // Assert that the struct is packed. assert(CGM.getIntSize() <= CGM.getPointerSize()); assert(CGM.getIntAlign() <= CGM.getPointerAlign()); assert((2 * CGM.getIntSize()).isMultipleOf(CGM.getPointerAlign())); @@ -887,7 +887,7 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { const CGBlockInfo::Capture &enclosingCapture = BlockInfo->getCapture(variable); - // This is a [[type]]*, except that a byref entry wil just be an i8**. + // This is a [[type]]*, except that a byref entry will just be an i8**. src = Builder.CreateStructGEP(LoadBlockStruct(), enclosingCapture.getIndex(), enclosingCapture.getOffset(), diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index abea61a49e0..159bbf55b5b 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -384,7 +384,7 @@ EncompassingIntegerType(ArrayRef<struct WidthAndSignedness> Types) { } // The encompassing type must have a width greater than or equal to the width - // of the specified types. Aditionally, if the encompassing type is signed, + // of the specified types. Additionally, if the encompassing type is signed, // its width must be strictly greater than the width of any unsigned types // given. unsigned Width = 0; @@ -478,7 +478,7 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, // LLVM only supports 0 and 2, make sure that we pass along that as a boolean. Value *Min = Builder.getInt1((Type & 2) != 0); - // For GCC compatability, __builtin_object_size treat NULL as unknown size. + // For GCC compatibility, __builtin_object_size treat NULL as unknown size. Value *NullIsUnknown = Builder.getTrue(); return Builder.CreateCall(F, {Ptr, Min, NullIsUnknown}); } @@ -2096,7 +2096,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, case Builtin::BI__sync_synchronize: { // We assume this is supposed to correspond to a C++0x-style // sequentially-consistent fence (i.e. this is only usable for - // synchonization, not device I/O or anything like that). This intrinsic + // synchronization, not device I/O or anything like that). This intrinsic // is really badly designed in the sense that in theory, there isn't // any way to safely use it... but in practice, it mostly works // to use it with non-atomic loads and stores to get acquire/release @@ -3319,7 +3319,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch()); if (!Prefix.empty()) { IntrinsicID = Intrinsic::getIntrinsicForGCCBuiltin(Prefix.data(), Name); - // NOTE we dont need to perform a compatibility flag check here since the + // NOTE we don't need to perform a compatibility flag check here since the // intrinsics are declared in Builtins*.def via LANGBUILTIN which filter the // MS builtins via ALL_MS_LANGUAGES and are filtered earlier. if (IntrinsicID == Intrinsic::not_intrinsic) diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index c72a5e58b47..47b8e436752 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -817,7 +817,7 @@ static SmallString<256> getUniqueTagTypeName(const TagType *Ty, return FullName; } -/// \return the approproate DWARF tag for a composite type. +/// \return the appropriate DWARF tag for a composite type. static llvm::dwarf::Tag getTagForRecord(const RecordDecl *RD) { llvm::dwarf::Tag Tag; if (RD->isStruct() || RD->isInterface()) @@ -2106,7 +2106,7 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod, llvm::raw_svector_ostream OS(ConfigMacros); const auto &PPOpts = CGM.getPreprocessorOpts(); unsigned I = 0; - // Translate the macro definitions back into a commmand line. + // Translate the macro definitions back into a command line. for (auto &M : PPOpts.Macros) { if (++I > 1) OS << " "; @@ -2871,7 +2871,7 @@ llvm::DICompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) { case llvm::dwarf::DW_TAG_structure_type: case llvm::dwarf::DW_TAG_union_type: case llvm::dwarf::DW_TAG_class_type: - // Immediatley resolve to a distinct node. + // Immediately resolve to a distinct node. RealDecl = llvm::MDNode::replaceWithDistinct(llvm::TempDICompositeType(RealDecl)); break; @@ -3587,7 +3587,7 @@ llvm::DILocalVariable *CGDebugInfo::EmitDeclare(const VarDecl *VD, const RecordDecl *RD = RT->getDecl(); if (RD->isUnion() && RD->isAnonymousStructOrUnion()) { // GDB has trouble finding local variables in anonymous unions, so we emit - // artifical local variables for each of the members. + // artificial local variables for each of the members. // // FIXME: Remove this code as soon as GDB supports this. // The debug info verifier in LLVM operates based on the assumption that a diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index e2871e3d0e8..6693ddd7478 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -746,7 +746,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { if (isToAtomic) { AggValueSlot valueDest = Dest; if (!valueDest.isIgnored() && CGF.CGM.isPaddedAtomicType(atomicType)) { - // Zero-initialize. (Strictly speaking, we only need to intialize + // Zero-initialize. (Strictly speaking, we only need to initialize // the padding at the end, but this is simpler.) if (!Dest.isZeroed()) CGF.EmitNullInitialization(Dest.getAddress(), atomicType); diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 3af2d7f317c..30bbca4c02b 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -1056,7 +1056,7 @@ ComplexPairTy ComplexExprEmitter::VisitInitListExpr(InitListExpr *E) { return Visit(E->getInit(0)); } - // Empty init list intializes to null + // Empty init list initializes to null assert(E->getNumInits() == 0 && "Unexpected number of inits"); QualType Ty = E->getType()->castAs<ComplexType>()->getElementType(); llvm::Type* LTy = CGF.ConvertType(Ty); diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 5b3db0371ed..fa47aca57c0 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -6948,7 +6948,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitIvarOffset( // This could be 32bit int or 64bit integer depending on the architecture. // Cast it to 64bit integer value, if it is a 32bit integer ivar offset value - // as this is what caller always expectes. + // as this is what caller always expects. if (ObjCTypes.IvarOffsetVarTy == ObjCTypes.IntTy) IvarOffsetValue = CGF.Builder.CreateIntCast( IvarOffsetValue, ObjCTypes.LongTy, true, "ivar.conv"); diff --git a/clang/lib/CodeGen/CGOpenCLRuntime.h b/clang/lib/CodeGen/CGOpenCLRuntime.h index 14fd1f1baf5..9378b6242ca 100644 --- a/clang/lib/CodeGen/CGOpenCLRuntime.h +++ b/clang/lib/CodeGen/CGOpenCLRuntime.h @@ -64,11 +64,11 @@ public: llvm::PointerType *getSamplerType(const Type *T); - // \brief Returnes a value which indicates the size in bytes of the pipe + // \brief Returns a value which indicates the size in bytes of the pipe // element. virtual llvm::Value *getPipeElemSize(const Expr *PipeArg); - // \brief Returnes a value which indicates the alignment in bytes of the pipe + // \brief Returns a value which indicates the alignment in bytes of the pipe // element. virtual llvm::Value *getPipeElemAlign(const Expr *PipeArg); diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 66149af43c5..d23989140ba 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -3808,7 +3808,7 @@ void CGOpenMPRuntime::createOffloadEntriesAndInfoMetadata() { // Right now we only generate metadata for function that contain target // regions. - // If we do not have entries, we dont need to do anything. + // If we do not have entries, we don't need to do anything. if (OffloadEntriesInfoManager.empty()) return; @@ -4942,7 +4942,7 @@ void CGOpenMPRuntime::emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, CGF.VoidPtrTy); } - // NOTE: routine and part_id fields are intialized by __kmpc_omp_task_alloc() + // NOTE: routine and part_id fields are initialized by __kmpc_omp_task_alloc() // libcall. // Build kmp_int32 __kmpc_omp_task_with_deps(ident_t *, kmp_int32 gtid, // kmp_task_t *new_task, kmp_int32 ndeps, kmp_depend_info_t *dep_list, @@ -5042,7 +5042,7 @@ void CGOpenMPRuntime::emitTaskLoopCall(CodeGenFunction &CGF, SourceLocation Loc, return; TaskResultTy Result = emitTaskInit(CGF, Loc, D, TaskFunction, SharedsTy, Shareds, Data); - // NOTE: routine and part_id fields are intialized by __kmpc_omp_task_alloc() + // NOTE: routine and part_id fields are initialized by __kmpc_omp_task_alloc() // libcall. // Call to void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int // if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int @@ -6605,7 +6605,7 @@ public: bool IsFirstComponentList, bool IsImplicit) const { // The following summarizes what has to be generated for each map and the - // types bellow. The generated information is expressed in this order: + // types below. The generated information is expressed in this order: // base pointer, section pointer, size, flags // (to add to the ones that come from the map type and modifier). // diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.h b/clang/lib/CodeGen/CGOpenMPRuntime.h index 51c3305f817..b922a21ea15 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.h +++ b/clang/lib/CodeGen/CGOpenMPRuntime.h @@ -133,7 +133,7 @@ private: /// Base declarations for the reduction items. SmallVector<const VarDecl *, 4> BaseDecls; - /// Emits lvalue for shared expresion. + /// Emits lvalue for shared expression. LValue emitSharedLValue(CodeGenFunction &CGF, const Expr *E); /// Emits upper bound for shared expression (if array section). LValue emitSharedLValueUB(CodeGenFunction &CGF, const Expr *E); @@ -1463,7 +1463,7 @@ public: /// Translates the native parameter of outlined function if this is required /// for target. - /// \param FD Field decl from captured record for the paramater. + /// \param FD Field decl from captured record for the parameter. /// \param NativeParam Parameter itself. virtual const VarDecl *translateParameter(const FieldDecl *FD, const VarDecl *NativeParam) const { @@ -2049,7 +2049,7 @@ public: /// Translates the native parameter of outlined function if this is required /// for target. - /// \param FD Field decl from captured record for the paramater. + /// \param FD Field decl from captured record for the parameter. /// \param NativeParam Parameter itself. const VarDecl *translateParameter(const FieldDecl *FD, const VarDecl *NativeParam) const override; diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h index fdb9d178503..997f10a2e93 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h @@ -278,7 +278,7 @@ public: /// Translates the native parameter of outlined function if this is required /// for target. - /// \param FD Field decl from captured record for the paramater. + /// \param FD Field decl from captured record for the parameter. /// \param NativeParam Parameter itself. const VarDecl *translateParameter(const FieldDecl *FD, const VarDecl *NativeParam) const override; diff --git a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp index 497c8aa4818..353f6cc796c 100644 --- a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -62,7 +62,7 @@ namespace { /// because LLVM reads from the complete type it can generate incorrect code /// if we do not clip the tail padding off of the bitfield in the complete /// layout. This introduces a somewhat awkward extra unnecessary clip stage. -/// The location of the clip is stored internally as a sentinal of type +/// The location of the clip is stored internally as a sentinel of type /// SCISSOR. If LLVM were updated to read base types (which it probably /// should because locations of things such as VBases are bogus in the llvm /// type anyway) then we could eliminate the SCISSOR. @@ -74,7 +74,7 @@ namespace { struct CGRecordLowering { // MemberInfo is a helper structure that contains information about a record // member. In additional to the standard member types, there exists a - // sentinal member type that ensures correct rounding. + // sentinel member type that ensures correct rounding. struct MemberInfo { CharUnits Offset; enum InfoKind { VFPtr, VBPtr, Field, Base, VBase, Scissor } Kind; @@ -186,7 +186,7 @@ struct CGRecordLowering { void clipTailPadding(); /// \brief Determines if we need a packed llvm struct. void determinePacked(bool NVBaseType); - /// \brief Inserts padding everwhere it's needed. + /// \brief Inserts padding everywhere it's needed. void insertPadding(); /// \brief Fills out the structures that are ultimately consumed. void fillOutputFields(); @@ -629,7 +629,7 @@ void CGRecordLowering::determinePacked(bool NVBaseType) { // non-virtual sub-object and an unpacked complete object or vise versa. if (NVSize % NVAlignment) Packed = true; - // Update the alignment of the sentinal. + // Update the alignment of the sentinel. if (!Packed) Members.back().Data = getIntNType(Context.toBits(Alignment)); } diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index ab1556e4f11..779bda681e4 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1037,7 +1037,7 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { Builder.ClearInsertionPoint(); } - // Emit the result value, even if unused, to evalute the side effects. + // Emit the result value, even if unused, to evaluate the side effects. const Expr *RV = S.getRetValue(); // Treat block literals in a return expression as if they appeared diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 1246e5ae07a..455a4fff1ae 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -4461,7 +4461,7 @@ void CodeGenFunction::EmitOMPUseDevicePtrClause( EmitDecl(*PvtVD); // The initialization variables reached its purpose in the emission - // ofthe previous declaration, so we don't need it anymore. + // of the previous declaration, so we don't need it anymore. LocalDeclMap.erase(InitVD); // Return the address of the private variable. @@ -4503,7 +4503,7 @@ void CodeGenFunction::EmitOMPTargetDataDirective( CGF.EmitStmt(S.getInnermostCapturedStmt()->getCapturedStmt()); }; - // Codegen that selects wheather to generate the privatization code or not. + // Codegen that selects whether to generate the privatization code or not. auto &&PrivCodeGen = [&S, &Info, &PrivatizeDevicePointers, &InnermostCodeGen](CodeGenFunction &CGF, PrePostActionTy &Action) { diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index bac538ed04e..d063f036d75 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -870,7 +870,7 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { llvm_unreachable("Invalid TemplateSpecializationKind!"); } -/// This is a callback from Sema to tell us that that a particular vtable is +/// This is a callback from Sema to tell us that a particular vtable is /// required to be emitted in this translation unit. /// /// This is only called for vtables that _must_ be emitted (mainly due to key diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 90f02205619..d251d64f5e9 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1453,7 +1453,7 @@ private: /// True if we need emit the life-time markers. const bool ShouldEmitLifetimeMarkers; - /// Add OpenCL kernel arg metadata and the kernel attribute meatadata to + /// Add OpenCL kernel arg metadata and the kernel attribute metadata to /// the function metadata. void EmitOpenCLKernelMetadata(const FunctionDecl *FD, llvm::Function *Fn); @@ -1717,7 +1717,7 @@ public: void EmitInitializerForField(FieldDecl *Field, LValue LHS, Expr *Init); - /// Struct with all informations about dynamic [sub]class needed to set vptr. + /// Struct with all information about dynamic [sub]class needed to set vptr. struct VPtr { BaseSubobject Base; const CXXRecordDecl *NearestVBase; diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index dcdb0dbc142..c3de87021f5 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2675,7 +2675,7 @@ bool CodeGenModule::isTypeConstant(QualType Ty, bool ExcludeCtor) { /// If D is non-null, it specifies a decl that correspond to this. This is used /// to set the attributes on the global when it is first created. /// -/// If IsForDefinition is true, it is guranteed that an actual global with +/// If IsForDefinition is true, it is guaranteed that an actual global with /// type Ty will be returned, not conversion of a variable with the same /// mangled name but some other type. llvm::Constant * @@ -2934,7 +2934,7 @@ CodeGenModule::CreateOrReplaceCXXRuntimeVariable(StringRef Name, /// GetAddrOfGlobalVar - Return the llvm::Constant for the address of the /// given global variable. If Ty is non-null and if the global doesn't exist, /// then it will be created with the specified type instead of whatever the -/// normal requested type would be. If IsForDefinition is true, it is guranteed +/// normal requested type would be. If IsForDefinition is true, it is guaranteed /// that an actual global with type Ty will be returned, not conversion of a /// variable with the same mangled name but some other type. llvm::Constant *CodeGenModule::GetAddrOfGlobalVar(const VarDecl *D, @@ -3330,7 +3330,7 @@ static bool isVarDeclStrongDefinition(const ASTContext &Context, return true; // A variable cannot be both common and exist in a section. - // We dont try to determine which is the right section in the front-end. + // We don't try to determine which is the right section in the front-end. // If no specialized section name is applicable, it will resort to default. if (D->hasAttr<PragmaClangBSSSectionAttr>() || D->hasAttr<PragmaClangDataSectionAttr>() || @@ -4188,7 +4188,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary( if (VD->isStaticDataMember() && VD->getAnyInitializer(InitVD) && isa<CXXRecordDecl>(InitVD->getLexicalDeclContext())) { // Temporaries defined inside a class get linkonce_odr linkage because the - // class can be defined in multipe translation units. + // class can be defined in multiple translation units. Linkage = llvm::GlobalVariable::LinkOnceODRLinkage; } else { // There is no need for this temporary to have external linkage if the diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 429bd18117b..5daa4e989d3 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -777,7 +777,7 @@ public: /// Return the llvm::Constant for the address of the given global variable. /// If Ty is non-null and if the global doesn't exist, then it will be created /// with the specified type instead of whatever the normal requested type - /// would be. If IsForDefinition is true, it is guranteed that an actual + /// would be. If IsForDefinition is true, it is guaranteed that an actual /// global with type Ty will be returned, not conversion of a variable with /// the same mangled name but some other type. llvm::Constant *GetAddrOfGlobalVar(const VarDecl *D, @@ -1178,7 +1178,7 @@ public: DeferredVTables.push_back(RD); } - /// Emit code for a singal global function or var decl. Forward declarations + /// Emit code for a single global function or var decl. Forward declarations /// are emitted lazily. void EmitGlobal(GlobalDecl D); diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index d4ff7dac6c0..c8a32d4f28e 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -298,7 +298,7 @@ public: auto Region = CounterMappingRegion::makeSkipped( *CovFileID, SR.LineStart, SR.ColumnStart, SR.LineEnd, SR.ColumnEnd); // Make sure that we only collect the regions that are inside - // the souce code of this function. + // the source code of this function. if (Region.LineStart >= FileLineRanges[*CovFileID].first && Region.LineEnd <= FileLineRanges[*CovFileID].second) MappingRegions.push_back(Region); diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 32027297aad..68274ea13a7 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -1436,7 +1436,7 @@ void ItaniumCXXABI::EmitInstanceFunctionProlog(CodeGenFunction &CGF) { return; /// Initialize the 'this' slot. In the Itanium C++ ABI, no prologue - /// adjustments are required, becuase they are all handled by thunks. + /// adjustments are required, because they are all handled by thunks. setCXXABIThisValue(CGF, loadIncomingCXXThis(CGF)); /// Initialize the 'vtt' slot if needed. diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index edd6a053f21..ab5bad45703 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -3363,7 +3363,7 @@ CGCXXABI *clang::CodeGen::CreateMicrosoftCXXABI(CodeGenModule &CGM) { // BaseClassArray: Contains a list of classes in a hierarchy. BaseClassArray is // somewhat of a misnomer because the most derived class is also in the list // as well as multiple copies of virtual bases (if they occur multiple times -// in the hiearchy.) The BaseClassArray contains one BaseClassDescriptor for +// in the hierarchy.) The BaseClassArray contains one BaseClassDescriptor for // every path in the hierarchy, in pre-order depth first order. Note, we do // not declare a specific llvm type for BaseClassArray, it's merely an array // of BaseClassDescriptor pointers. @@ -3911,7 +3911,7 @@ MicrosoftCXXABI::getAddrOfCXXCtorClosure(const CXXConstructorDecl *CD, SourceLocation(), &getContext().Idents.get("is_most_derived"), getContext().IntTy, ImplicitParamDecl::Other); - // Only add the parameter to the list if thie class has virtual bases. + // Only add the parameter to the list if the class has virtual bases. if (RD->getNumVBases() > 0) FunctionArgs.push_back(&IsMostDerived); diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h index 533e14514ff..24bd731419a 100644 --- a/clang/lib/CodeGen/TargetInfo.h +++ b/clang/lib/CodeGen/TargetInfo.h @@ -266,7 +266,7 @@ public: virtual llvm::SyncScope::ID getLLVMSyncScopeID(SyncScope S, llvm::LLVMContext &C) const; - /// Inteface class for filling custom fields of a block literal for OpenCL. + /// Interface class for filling custom fields of a block literal for OpenCL. class TargetOpenCLBlockHelper { public: typedef std::pair<llvm::Value *, StringRef> ValueTy; diff --git a/clang/lib/CodeGen/VarBypassDetector.cpp b/clang/lib/CodeGen/VarBypassDetector.cpp index cfb93d6a9fc..2f8a591a3e7 100644 --- a/clang/lib/CodeGen/VarBypassDetector.cpp +++ b/clang/lib/CodeGen/VarBypassDetector.cpp @@ -95,7 +95,7 @@ bool VarBypassDetector::BuildScopeInformation(const Stmt *S, case Stmt::CaseStmtClass: case Stmt::DefaultStmtClass: case Stmt::LabelStmtClass: - llvm_unreachable("the loop bellow handles labels and cases"); + llvm_unreachable("the loop below handles labels and cases"); break; default: |