[llvm] 6b36cfa - [NFC][IR][DebugInfo] Fix typos in comments (#163957)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 17 09:48:51 PDT 2025
Author: J. Ryan Stinnett
Date: 2025-10-17T17:48:47+01:00
New Revision: 6b36cfaef8fc26fe0e9538c095fa0d1ee5703756
URL: https://github.com/llvm/llvm-project/commit/6b36cfaef8fc26fe0e9538c095fa0d1ee5703756
DIFF: https://github.com/llvm/llvm-project/commit/6b36cfaef8fc26fe0e9538c095fa0d1ee5703756.diff
LOG: [NFC][IR][DebugInfo] Fix typos in comments (#163957)
This fixes a few typos noticed while browsing around IR-related files.
Added:
Modified:
llvm/include/llvm/IR/DebugProgramInstruction.h
llvm/include/llvm/IR/Value.h
llvm/lib/IR/DebugInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DebugProgramInstruction.h b/llvm/include/llvm/IR/DebugProgramInstruction.h
index e0292c2b8d2d2..457c60e3bc929 100644
--- a/llvm/include/llvm/IR/DebugProgramInstruction.h
+++ b/llvm/include/llvm/IR/DebugProgramInstruction.h
@@ -14,7 +14,7 @@
// dbg.value(metadata i32 %foo, ...)
// %bar = void call @ext(%foo);
//
-// and all information is stored in the Value / Metadata hierachy defined
+// and all information is stored in the Value / Metadata hierarchy defined
// elsewhere in LLVM. In the "DbgRecord" design, each instruction /may/ have a
// connection with a DbgMarker, which identifies a position immediately before
// the instruction, and each DbgMarker /may/ then have connections to DbgRecords
@@ -37,7 +37,7 @@
//
// This structure separates the two concerns of the position of the debug-info
// in the function, and the Value that it refers to. It also creates a new
-// "place" in-between the Value / Metadata hierachy where we can customise
+// "place" in-between the Value / Metadata hierarchy where we can customise
// storage and allocation techniques to better suite debug-info workloads.
// NB: as of the initial prototype, none of that has actually been attempted
// yet.
@@ -162,7 +162,7 @@ class DbgRecord : public ilist_node<DbgRecord> {
LLVM_ABI bool isIdenticalToWhenDefined(const DbgRecord &R) const;
/// Convert this DbgRecord back into an appropriate llvm.dbg.* intrinsic.
/// \p InsertBefore Optional position to insert this intrinsic.
- /// \returns A new llvm.dbg.* intrinsic representiung this DbgRecord.
+ /// \returns A new llvm.dbg.* intrinsic representing this DbgRecord.
LLVM_ABI DbgInfoIntrinsic *
createDebugIntrinsic(Module *M, Instruction *InsertBefore) const;
///@}
@@ -530,7 +530,7 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
LLVM_ABI void setKillAddress();
/// Check whether this kills the address component. This doesn't take into
/// account the position of the intrinsic, therefore a returned value of false
- /// does not guarentee the address is a valid location for the variable at the
+ /// does not guarantee the address is a valid location for the variable at the
/// intrinsic's position in IR.
LLVM_ABI bool isKillAddress() const;
@@ -539,7 +539,7 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
LLVM_ABI DbgVariableRecord *clone() const;
/// Convert this DbgVariableRecord back into a dbg.value intrinsic.
/// \p InsertBefore Optional position to insert this intrinsic.
- /// \returns A new dbg.value intrinsic representiung this DbgVariableRecord.
+ /// \returns A new dbg.value intrinsic representing this DbgVariableRecord.
LLVM_ABI DbgVariableIntrinsic *
createDebugIntrinsic(Module *M, Instruction *InsertBefore) const;
diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h
index 04d0391c04098..58822a0645747 100644
--- a/llvm/include/llvm/IR/Value.h
+++ b/llvm/include/llvm/IR/Value.h
@@ -484,8 +484,8 @@ class Value {
/// Remove every uses that can safely be removed.
///
/// This will remove for example uses in llvm.assume.
- /// This should be used when performing want to perform a tranformation but
- /// some Droppable uses pervent it.
+ /// This should be used when performing want to perform a transformation but
+ /// some Droppable uses prevent it.
/// This function optionally takes a filter to only remove some droppable
/// uses.
LLVM_ABI void
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 14a4f88bf4719..58836068a4929 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -294,9 +294,9 @@ void DebugInfoFinder::processSubprogram(DISubprogram *SP) {
// just DISubprogram's, referenced from anywhere within the Function being
// cloned prior to calling MapMetadata / RemapInstruction to avoid their
// duplication later as DICompileUnit's are also directly referenced by
- // llvm.dbg.cu list. Thefore we need to collect DICompileUnit's here as well.
- // Also, DICompileUnit's may reference DISubprogram's too and therefore need
- // to be at least looked through.
+ // llvm.dbg.cu list. Therefore we need to collect DICompileUnit's here as
+ // well. Also, DICompileUnit's may reference DISubprogram's too and therefore
+ // need to be at least looked through.
processCompileUnit(SP->getUnit());
processType(SP->getType());
for (auto *Element : SP->getTemplateParams()) {
@@ -377,7 +377,7 @@ bool DebugInfoFinder::addScope(DIScope *Scope) {
/// Recursively handle DILocations in followup metadata etc.
///
-/// TODO: If for example a followup loop metadata would refence itself this
+/// TODO: If for example a followup loop metadata would reference itself this
/// function would go into infinite recursion. We do not expect such cycles in
/// the loop metadata (except for the self-referencing first element
/// "LoopID"). However, we could at least handle such situations more gracefully
@@ -679,7 +679,7 @@ class DebugTypeInfoRemoval {
auto Variables = nullptr;
auto TemplateParams = nullptr;
- // Make a distinct DISubprogram, for situations that warrent it.
+ // Make a distinct DISubprogram, for situations that warrant it.
auto distinctMDSubprogram = [&]() {
return DISubprogram::getDistinct(
MDS->getContext(), FileAndScope, MDS->getName(), LinkageName,
@@ -2043,7 +2043,7 @@ void at::remapAssignID(DenseMap<DIAssignID *, DIAssignID *> &Map,
I.setMetadata(LLVMContext::MD_DIAssignID, GetNewID(ID));
}
-/// Collect constant properies (base, size, offset) of \p StoreDest.
+/// Collect constant properties (base, size, offset) of \p StoreDest.
/// Return std::nullopt if any properties are not constants or the
/// offset from the base pointer is negative.
static std::optional<AssignmentInfo>
@@ -2329,7 +2329,7 @@ PreservedAnalyses AssignmentTrackingPass::run(Function &F,
return PreservedAnalyses::all();
// Record that this module uses assignment tracking. It doesn't matter that
- // some functons in the module may not use it - the debug info in those
+ // some functions in the module may not use it - the debug info in those
// functions will still be handled properly.
setAssignmentTrackingModuleFlag(*F.getParent());
More information about the llvm-commits
mailing list