[llvm] 59c8477 - [NFC][llvm] Inclusive language: remove uses of sanity in llvm/lib/ExecutionEngine/
Zarko Todorovski via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 17 19:18:04 PST 2021
Author: Zarko Todorovski
Date: 2021-11-17T22:17:54-05:00
New Revision: 59c84774d21ab5a38c59d62239d37010f2a1e9cf
URL: https://github.com/llvm/llvm-project/commit/59c84774d21ab5a38c59d62239d37010f2a1e9cf
DIFF: https://github.com/llvm/llvm-project/commit/59c84774d21ab5a38c59d62239d37010f2a1e9cf.diff
LOG: [NFC][llvm] Inclusive language: remove uses of sanity in llvm/lib/ExecutionEngine/
Reworded and removed code comments to avoid using `sanity check` and `sanity
test`.
Added:
Modified:
llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp b/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
index 799cffb7116e8..c7b1c65f2f9a4 100644
--- a/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
+++ b/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
@@ -103,7 +103,7 @@ void ContinuationRecordBuilder::writeMemberType(RecordType &Record) {
if (getCurrentSegmentLength() > MaxSegmentLength) {
// We need to inject some bytes before the member we just wrote but after
// the previous member. Save off the length of the member we just wrote so
- // that we can do some sanity checking on it.
+ // that we can do validate it.
uint32_t MemberLength = SegmentWriter.getOffset() - OriginalOffset;
(void) MemberLength;
insertSegmentEnd(OriginalOffset);
diff --git a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
index c1741dde00a6a..4d7d5ce266683 100644
--- a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
@@ -299,7 +299,7 @@ Error EHFrameEdgeFixer::processCIE(ParseContext &PC, Block &B,
if (auto Err = RecordReader.skip(PC.G.getPointerSize()))
return Err;
- // Read and sanity check the code alignment factor.
+ // Read and validate the code alignment factor.
{
uint64_t CodeAlignmentFactor = 0;
if (auto Err = RecordReader.readULEB128(CodeAlignmentFactor))
@@ -310,7 +310,7 @@ Error EHFrameEdgeFixer::processCIE(ParseContext &PC, Block &B,
" (expected 1)");
}
- // Read and sanity check the data alignment factor.
+ // Read and validate the data alignment factor.
{
int64_t DataAlignmentFactor = 0;
if (auto Err = RecordReader.readSLEB128(DataAlignmentFactor))
diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
index 0cd111743edbe..3ea9ffee65546 100644
--- a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
@@ -156,7 +156,7 @@ class ELFLinkGraphBuilder_x86_64 : public ELFLinkGraphBuilder<object::ELF64LE> {
using Base = ELFLinkGraphBuilder<ELFT>;
using Self = ELFLinkGraphBuilder_x86_64;
for (const auto &RelSect : Base::Sections) {
- // Sanity check the section to read relocation entries from.
+ // Validate the section to read relocation entries from.
if (RelSect.sh_type == ELF::SHT_REL)
return make_error<StringError>(
"No SHT_REL in valid x64 ELF object files",
@@ -189,7 +189,7 @@ class ELFLinkGraphBuilder_x86_64 : public ELFLinkGraphBuilder<object::ELF64LE> {
Base::GraphSymbols.size()),
inconvertibleErrorCode());
- // Sanity check the relocation kind.
+ // Validate the relocation kind.
auto ELFRelocKind = getRelocationKind(Rel.getType(false));
if (!ELFRelocKind)
return ELFRelocKind.takeError();
diff --git a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
index 01f2ae76785a6..d588b63d9e88f 100644
--- a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
@@ -23,7 +23,7 @@ MachOLinkGraphBuilder::~MachOLinkGraphBuilder() {}
Expected<std::unique_ptr<LinkGraph>> MachOLinkGraphBuilder::buildGraph() {
- // Sanity check: we only operate on relocatable objects.
+ // We only operate on relocatable objects.
if (!Obj.isRelocatableObject())
return make_error<JITLinkError>("Object is not a relocatable MachO");
@@ -281,7 +281,7 @@ Error MachOLinkGraphBuilder::createNormalizedSymbols() {
dbgs() << "\n";
});
- // If this symbol has a section, sanity check that the addresses line up.
+ // If this symbol has a section, verify that the addresses line up.
if (Sect != 0) {
auto NSec = findSectionByIndex(Sect - 1);
if (!NSec)
diff --git a/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp b/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
index c20fae5957274..f2a029d35cd5f 100644
--- a/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
@@ -228,7 +228,7 @@ class MachOLinkGraphBuilder_arm64 : public MachOLinkGraphBuilder {
MachO::relocation_info RI = getRelocationInfo(RelItr);
- // Sanity check the relocation kind.
+ // Validate the relocation kind.
auto Kind = getRelocationKind(RI);
if (!Kind)
return Kind.takeError();
diff --git a/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
index 0c5d1adaf6d49..a4fcd3b9a5f57 100644
--- a/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
@@ -272,7 +272,7 @@ class MachOLinkGraphBuilder_x86_64 : public MachOLinkGraphBuilder {
Symbol *TargetSymbol = nullptr;
uint64_t Addend = 0;
- // Sanity check the relocation kind.
+ // Validate the relocation kind.
auto MachORelocKind = getRelocKind(RI);
if (!MachORelocKind)
return MachORelocKind.takeError();
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h
index 0f431fae2c7ff..fcf723aaea28c 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h
@@ -140,7 +140,7 @@ class RuntimeDyldMachOARM
return ++RelI;
}
- // Sanity check relocation type.
+ // Validate the relocation type.
switch (RelType) {
UNIMPLEMENTED_RELOC(MachO::ARM_RELOC_PAIR);
UNIMPLEMENTED_RELOC(MachO::ARM_RELOC_SECTDIFF);
More information about the llvm-commits
mailing list