Skip to content

Commit 6b36cfa

Browse files
authored
[NFC][IR][DebugInfo] Fix typos in comments (llvm#163957)
This fixes a few typos noticed while browsing around IR-related files.
1 parent 92757f9 commit 6b36cfa

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

llvm/include/llvm/IR/DebugProgramInstruction.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// dbg.value(metadata i32 %foo, ...)
1515
// %bar = void call @ext(%foo);
1616
//
17-
// and all information is stored in the Value / Metadata hierachy defined
17+
// and all information is stored in the Value / Metadata hierarchy defined
1818
// elsewhere in LLVM. In the "DbgRecord" design, each instruction /may/ have a
1919
// connection with a DbgMarker, which identifies a position immediately before
2020
// the instruction, and each DbgMarker /may/ then have connections to DbgRecords
@@ -37,7 +37,7 @@
3737
//
3838
// This structure separates the two concerns of the position of the debug-info
3939
// in the function, and the Value that it refers to. It also creates a new
40-
// "place" in-between the Value / Metadata hierachy where we can customise
40+
// "place" in-between the Value / Metadata hierarchy where we can customise
4141
// storage and allocation techniques to better suite debug-info workloads.
4242
// NB: as of the initial prototype, none of that has actually been attempted
4343
// yet.
@@ -162,7 +162,7 @@ class DbgRecord : public ilist_node<DbgRecord> {
162162
LLVM_ABI bool isIdenticalToWhenDefined(const DbgRecord &R) const;
163163
/// Convert this DbgRecord back into an appropriate llvm.dbg.* intrinsic.
164164
/// \p InsertBefore Optional position to insert this intrinsic.
165-
/// \returns A new llvm.dbg.* intrinsic representiung this DbgRecord.
165+
/// \returns A new llvm.dbg.* intrinsic representing this DbgRecord.
166166
LLVM_ABI DbgInfoIntrinsic *
167167
createDebugIntrinsic(Module *M, Instruction *InsertBefore) const;
168168
///@}
@@ -530,7 +530,7 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
530530
LLVM_ABI void setKillAddress();
531531
/// Check whether this kills the address component. This doesn't take into
532532
/// account the position of the intrinsic, therefore a returned value of false
533-
/// does not guarentee the address is a valid location for the variable at the
533+
/// does not guarantee the address is a valid location for the variable at the
534534
/// intrinsic's position in IR.
535535
LLVM_ABI bool isKillAddress() const;
536536

@@ -539,7 +539,7 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
539539
LLVM_ABI DbgVariableRecord *clone() const;
540540
/// Convert this DbgVariableRecord back into a dbg.value intrinsic.
541541
/// \p InsertBefore Optional position to insert this intrinsic.
542-
/// \returns A new dbg.value intrinsic representiung this DbgVariableRecord.
542+
/// \returns A new dbg.value intrinsic representing this DbgVariableRecord.
543543
LLVM_ABI DbgVariableIntrinsic *
544544
createDebugIntrinsic(Module *M, Instruction *InsertBefore) const;
545545

llvm/include/llvm/IR/Value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ class Value {
484484
/// Remove every uses that can safely be removed.
485485
///
486486
/// This will remove for example uses in llvm.assume.
487-
/// This should be used when performing want to perform a tranformation but
488-
/// some Droppable uses pervent it.
487+
/// This should be used when performing want to perform a transformation but
488+
/// some Droppable uses prevent it.
489489
/// This function optionally takes a filter to only remove some droppable
490490
/// uses.
491491
LLVM_ABI void

llvm/lib/IR/DebugInfo.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ void DebugInfoFinder::processSubprogram(DISubprogram *SP) {
294294
// just DISubprogram's, referenced from anywhere within the Function being
295295
// cloned prior to calling MapMetadata / RemapInstruction to avoid their
296296
// duplication later as DICompileUnit's are also directly referenced by
297-
// llvm.dbg.cu list. Thefore we need to collect DICompileUnit's here as well.
298-
// Also, DICompileUnit's may reference DISubprogram's too and therefore need
299-
// to be at least looked through.
297+
// llvm.dbg.cu list. Therefore we need to collect DICompileUnit's here as
298+
// well. Also, DICompileUnit's may reference DISubprogram's too and therefore
299+
// need to be at least looked through.
300300
processCompileUnit(SP->getUnit());
301301
processType(SP->getType());
302302
for (auto *Element : SP->getTemplateParams()) {
@@ -377,7 +377,7 @@ bool DebugInfoFinder::addScope(DIScope *Scope) {
377377

378378
/// Recursively handle DILocations in followup metadata etc.
379379
///
380-
/// TODO: If for example a followup loop metadata would refence itself this
380+
/// TODO: If for example a followup loop metadata would reference itself this
381381
/// function would go into infinite recursion. We do not expect such cycles in
382382
/// the loop metadata (except for the self-referencing first element
383383
/// "LoopID"). However, we could at least handle such situations more gracefully
@@ -679,7 +679,7 @@ class DebugTypeInfoRemoval {
679679
auto Variables = nullptr;
680680
auto TemplateParams = nullptr;
681681

682-
// Make a distinct DISubprogram, for situations that warrent it.
682+
// Make a distinct DISubprogram, for situations that warrant it.
683683
auto distinctMDSubprogram = [&]() {
684684
return DISubprogram::getDistinct(
685685
MDS->getContext(), FileAndScope, MDS->getName(), LinkageName,
@@ -2043,7 +2043,7 @@ void at::remapAssignID(DenseMap<DIAssignID *, DIAssignID *> &Map,
20432043
I.setMetadata(LLVMContext::MD_DIAssignID, GetNewID(ID));
20442044
}
20452045

2046-
/// Collect constant properies (base, size, offset) of \p StoreDest.
2046+
/// Collect constant properties (base, size, offset) of \p StoreDest.
20472047
/// Return std::nullopt if any properties are not constants or the
20482048
/// offset from the base pointer is negative.
20492049
static std::optional<AssignmentInfo>
@@ -2329,7 +2329,7 @@ PreservedAnalyses AssignmentTrackingPass::run(Function &F,
23292329
return PreservedAnalyses::all();
23302330

23312331
// Record that this module uses assignment tracking. It doesn't matter that
2332-
// some functons in the module may not use it - the debug info in those
2332+
// some functions in the module may not use it - the debug info in those
23332333
// functions will still be handled properly.
23342334
setAssignmentTrackingModuleFlag(*F.getParent());
23352335

0 commit comments

Comments
 (0)