[DWARFYAML] Rename checkListEntryOperands() to checkOperandCount(). NFC.
authorXing GUO <higuoxing@gmail.com>
Tue, 28 Jul 2020 14:20:10 +0000 (22:20 +0800)
committerXing GUO <higuoxing@gmail.com>
Tue, 28 Jul 2020 14:57:39 +0000 (22:57 +0800)
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

llvm/lib/ObjectYAML/DWARFEmitter.cpp

index b39bb00..66fabe8 100644 (file)
@@ -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 {