From 6784d82d5b859cc14a63358d34ed50e6e2f9bf43 Mon Sep 17 00:00:00 2001 From: Xing GUO Date: Tue, 28 Jul 2020 22:20:10 +0800 Subject: [PATCH] [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 --- llvm/lib/ObjectYAML/DWARFEmitter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp index b39bb00..66fabe8 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 Values, - uint64_t ExpectedOperands) { +static Error checkOperandCount(StringRef EncodingString, + ArrayRef Values, + uint64_t ExpectedOperands) { if (Values.size() != ExpectedOperands) return createStringError( errc::invalid_argument, @@ -578,7 +578,7 @@ static Expected 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 { -- 2.7.4