[llvm] 6784d82 - [DWARFYAML] Rename checkListEntryOperands() to checkOperandCount(). NFC.
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 07:57:58 PDT 2020
Author: Xing GUO
Date: 2020-07-28T22:57:39+08:00
New Revision: 6784d82d5b859cc14a63358d34ed50e6e2f9bf43
URL: https://github.com/llvm/llvm-project/commit/6784d82d5b859cc14a63358d34ed50e6e2f9bf43
DIFF: https://github.com/llvm/llvm-project/commit/6784d82d5b859cc14a63358d34ed50e6e2f9bf43.diff
LOG: [DWARFYAML] Rename checkListEntryOperands() to checkOperandCount(). NFC.
This patch renames checkListEntryOperands() to checkOperandCount(), so
that we are able to check DWARF expression operands using the same
function.
Reviewed By: jhenderson, labath
Differential Revision: https://reviews.llvm.org/D84624
Added:
Modified:
llvm/lib/ObjectYAML/DWARFEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index b39bb003db9a..66fabe875f7b 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@ -543,9 +543,9 @@ Error DWARFYAML::emitDebugStrOffsets(raw_ostream &OS, const Data &DI) {
return Error::success();
}
-static Error checkListEntryOperands(StringRef EncodingString,
- ArrayRef<yaml::Hex64> Values,
- uint64_t ExpectedOperands) {
+static Error checkOperandCount(StringRef EncodingString,
+ ArrayRef<yaml::Hex64> Values,
+ uint64_t ExpectedOperands) {
if (Values.size() != ExpectedOperands)
return createStringError(
errc::invalid_argument,
@@ -578,7 +578,7 @@ static Expected<uint64_t> writeListEntry(raw_ostream &OS,
StringRef EncodingName = dwarf::RangeListEncodingString(Entry.Operator);
auto CheckOperands = [&](uint64_t ExpectedOperands) -> Error {
- return checkListEntryOperands(EncodingName, Entry.Values, ExpectedOperands);
+ return checkOperandCount(EncodingName, Entry.Values, ExpectedOperands);
};
auto WriteAddress = [&](uint64_t Addr) -> Error {
More information about the llvm-commits
mailing list