[Mlir-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] Remove unused variable throughout the monorepo (PR #204994)
Nikolas Klauser
llvmlistbot at llvm.org
Sun Jun 21 10:55:24 PDT 2026
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/204994
None
>From 5853f852c3ce3c461bbfd1a934bf0f43e39aade7 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Sun, 21 Jun 2026 19:54:52 +0200
Subject: [PATCH] Remove unused variable throughout the monorepo
---
clang-tools-extra/clangd/IncludeFixer.cpp | 7 -
.../modularize/PreprocessorTracker.cpp | 3 -
clang/lib/Driver/ToolChains/Hexagon.cpp | 1 -
.../Checkers/StdLibraryFunctionsChecker.cpp | 4 -
clang/unittests/AST/ASTImporterFixtures.cpp | 2 -
.../Interpreter/CodeCompletionTest.cpp | 1 -
.../unittests/Tooling/HeaderIncludesTest.cpp | 1 -
.../source/Commands/CommandObjectCommands.cpp | 167 +++++++++---------
lldb/source/Commands/CommandObjectHelp.cpp | 1 -
.../source/Interpreter/CommandInterpreter.cpp | 3 -
.../Hexagon-DYLD/HexagonDYLDRendezvous.cpp | 2 -
.../POSIX-DYLD/DYLDRendezvous.cpp | 2 -
.../GDBRemoteCommunicationServerPlatform.cpp | 5 +-
.../Protocol/MCP/ProtocolServerMCP.cpp | 2 -
lldb/source/Target/StackFrameList.cpp | 1 -
lldb/tools/yaml2macho-core/yaml2macho.cpp | 2 -
.../Orc/TargetProcess/SimpleRemoteEPCServer.h | 1 -
.../llvm/ExecutionEngine/Orc/TaskDispatch.h | 4 +-
llvm/lib/DWARFCFIChecker/DWARFCFIState.cpp | 2 +-
.../llvm-libtool-darwin.cpp | 4 -
llvm/tools/llvm-rc/ResourceScriptParser.cpp | 3 +-
llvm/tools/llvm-rc/ResourceScriptParser.h | 1 -
llvm/tools/sancov/sancov.cpp | 1 -
llvm/unittests/ADT/STLExtrasTest.cpp | 4 +-
llvm/unittests/CodeGen/PassManagerTest.cpp | 1 -
llvm/unittests/TextAPI/TextStubV3Tests.cpp | 10 +-
llvm/unittests/TextAPI/TextStubV4Tests.cpp | 4 -
.../OpenMP/OpenMPToLLVMIRTranslation.cpp | 1 -
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | 1 -
29 files changed, 90 insertions(+), 151 deletions(-)
diff --git a/clang-tools-extra/clangd/IncludeFixer.cpp b/clang-tools-extra/clangd/IncludeFixer.cpp
index 3f3d7fbefd58e..5ecf853524a3f 100644
--- a/clang-tools-extra/clangd/IncludeFixer.cpp
+++ b/clang-tools-extra/clangd/IncludeFixer.cpp
@@ -613,13 +613,6 @@ IncludeFixer::lookupCached(const SymbolID &ID) const {
Index.lookup(Req, [&](const Symbol &Sym) { Matches.insert(Sym); });
auto Syms = std::move(Matches).build();
- std::vector<Fix> Fixes;
- if (!Syms.empty()) {
- auto &Matched = *Syms.begin();
- if (!Matched.IncludeHeaders.empty() && Matched.Definition &&
- Matched.CanonicalDeclaration.FileURI == Matched.Definition.FileURI)
- Fixes = fixesForSymbols(Syms);
- }
auto E = LookupCache.try_emplace(ID, std::move(Syms));
return &E.first->second;
}
diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp
index 04abb2733f5a7..6205b97a17176 100644
--- a/clang-tools-extra/modularize/PreprocessorTracker.cpp
+++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp
@@ -1078,9 +1078,6 @@ class PreprocessorTrackerImpl : public PreprocessorTracker {
auto I = ConditionalExpansions.find(InstanceKey);
// If existing instance of condition not found, add one.
if (I == ConditionalExpansions.end()) {
- std::string InstanceSourceLine =
- getSourceLocationString(PP, InstanceLoc) + ":\n" +
- getSourceLine(PP, InstanceLoc) + "\n";
ConditionalExpansions[InstanceKey] =
ConditionalTracker(DirectiveKind, ConditionValue,
ConditionUnexpandedHandle, InclusionPathHandle);
diff --git a/clang/lib/Driver/ToolChains/Hexagon.cpp b/clang/lib/Driver/ToolChains/Hexagon.cpp
index ab207317667c6..b890431ef7f6c 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -534,7 +534,6 @@ void hexagon::Linker::ConstructJob(Compilation &C, const JobAction &JA,
std::string HexagonToolChain::getHexagonTargetDir(
const std::string &InstalledDir,
const SmallVectorImpl<std::string> &PrefixDirs) const {
- std::string InstallRelDir;
const Driver &D = getDriver();
// Locate the rest of the toolchain ...
diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
index 50b34cb181ca5..4fe3e1f7623f6 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
@@ -2149,8 +2149,6 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ErrnoIrrelevant)
.ArgConstraint(NotNull(ArgNo(0))));
} else {
- const auto ReturnsZeroOrMinusOne =
- ConstraintSet{ReturnValueCondition(WithinRange, Range(-1, 0))};
const auto ReturnsZero =
ConstraintSet{ReturnValueCondition(WithinRange, SingleValue(0))};
const auto ReturnsMinusOne =
@@ -2161,8 +2159,6 @@ void StdLibraryFunctionsChecker::initFunctionSummaries(
ConstraintSet{ReturnValueCondition(WithinRange, Range(0, IntMax))};
const auto ReturnsNonZero =
ConstraintSet{ReturnValueCondition(OutOfRange, SingleValue(0))};
- const auto ReturnsFileDescriptor =
- ConstraintSet{ReturnValueCondition(WithinRange, Range(-1, IntMax))};
const auto &ReturnsValidFileDescriptor = ReturnsNonnegative;
auto ValidFileDescriptorOrAtFdcwd = [&](ArgNo ArgN) {
diff --git a/clang/unittests/AST/ASTImporterFixtures.cpp b/clang/unittests/AST/ASTImporterFixtures.cpp
index e4e5a078262c3..48421fe90a431 100644
--- a/clang/unittests/AST/ASTImporterFixtures.cpp
+++ b/clang/unittests/AST/ASTImporterFixtures.cpp
@@ -142,7 +142,6 @@ std::tuple<Decl *, Decl *> ASTImporterTestBase::getImportedDecl(
StringRef FromSrcCode, TestLanguage FromLang, StringRef ToSrcCode,
TestLanguage ToLang, StringRef Identifier) {
std::vector<std::string> FromArgs = getCommandLineArgsForLanguage(FromLang);
- std::vector<std::string> ToArgs = getCommandLineArgsForLanguage(ToLang);
FromTUs.emplace_back(FromSrcCode, InputFileName, FromArgs, Creator,
ODRHandling);
@@ -185,7 +184,6 @@ TranslationUnitDecl *ASTImporterTestBase::getTuDecl(StringRef SrcCode,
TranslationUnitDecl *ASTImporterTestBase::getToTuDecl(StringRef ToSrcCode,
TestLanguage ToLang) {
- std::vector<std::string> ToArgs = getCommandLineArgsForLanguage(ToLang);
assert(!ToAST);
lazyInitToAST(ToLang, ToSrcCode, OutputFileName);
return ToAST->getASTContext().getTranslationUnitDecl();
diff --git a/clang/unittests/Interpreter/CodeCompletionTest.cpp b/clang/unittests/Interpreter/CodeCompletionTest.cpp
index ceb683497ac74..5c6047f294721 100644
--- a/clang/unittests/Interpreter/CodeCompletionTest.cpp
+++ b/clang/unittests/Interpreter/CodeCompletionTest.cpp
@@ -98,7 +98,6 @@ TEST_F(CodeCompletionTest, TwoDecls) {
TEST_F(CodeCompletionTest, CompFunDeclsNoError) {
auto Err = llvm::Error::success();
- auto comps = runComp("void app(", Err);
EXPECT_EQ((bool)Err, false);
}
diff --git a/clang/unittests/Tooling/HeaderIncludesTest.cpp b/clang/unittests/Tooling/HeaderIncludesTest.cpp
index 8259394cb30bc..95fb05885a0b9 100644
--- a/clang/unittests/Tooling/HeaderIncludesTest.cpp
+++ b/clang/unittests/Tooling/HeaderIncludesTest.cpp
@@ -678,7 +678,6 @@ int main() {
std::vector<int> ints {};
})cpp";
- auto InsertedCode = insert(Code, "<vector>");
EXPECT_EQ(Expected, insert(Code, "<vector>"));
}
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 84e661ec01f53..4f4602dba600c 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -627,7 +627,6 @@ class CommandObjectCommandsUnalias : public CommandObjectParsed {
protected:
void DoExecute(Args &args, CommandReturnObject &result) override {
- CommandObject::CommandMap::iterator pos;
CommandObject *cmd_obj;
if (args.empty()) {
@@ -702,8 +701,6 @@ class CommandObjectCommandsDelete : public CommandObjectParsed {
protected:
void DoExecute(Args &args, CommandReturnObject &result) override {
- CommandObject::CommandMap::iterator pos;
-
if (args.empty()) {
result.AppendErrorWithFormat("must call '%s' with one or more valid user "
"defined regular expression command names",
@@ -1236,13 +1233,13 @@ class CommandObjectScriptingObjectRaw : public CommandObjectRaw {
/// So I've also added a base class in Python that provides a table-driven
/// way of defining the options and arguments, which automatically fills the
/// option values, making them available as properties in Python.
-///
+///
class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
-private:
+private:
class CommandOptions : public Options {
public:
- CommandOptions(CommandInterpreter &interpreter,
- StructuredData::GenericSP cmd_obj_sp) : m_interpreter(interpreter),
+ CommandOptions(CommandInterpreter &interpreter,
+ StructuredData::GenericSP cmd_obj_sp) : m_interpreter(interpreter),
m_cmd_obj_sp(cmd_obj_sp) {}
~CommandOptions() override = default;
@@ -1250,7 +1247,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override {
Status error;
- ScriptInterpreter *scripter =
+ ScriptInterpreter *scripter =
m_interpreter.GetDebugger().GetScriptInterpreter();
if (!scripter) {
return Status::FromErrorString(
@@ -1271,9 +1268,9 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
// Pass the long option, since you aren't actually required to have a
// short_option, and for those options the index or short option character
// aren't meaningful on the python side.
- const char * long_option =
+ const char * long_option =
m_options_definition_up.get()[option_idx].long_option;
- bool success = scripter->SetOptionValueForCommandObject(m_cmd_obj_sp,
+ bool success = scripter->SetOptionValueForCommandObject(m_cmd_obj_sp,
execution_context, long_option, option_arg);
if (!success)
return Status::FromErrorStringWithFormatv(
@@ -1282,7 +1279,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
}
void OptionParsingStarting(ExecutionContext *execution_context) override {
- ScriptInterpreter *scripter =
+ ScriptInterpreter *scripter =
m_interpreter.GetDebugger().GetScriptInterpreter();
if (!scripter || !m_cmd_obj_sp)
return;
@@ -1295,8 +1292,8 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
return {};
return llvm::ArrayRef(m_options_definition_up.get(), m_num_options);
}
-
- static Status ParseUsageMaskFromArray(StructuredData::ObjectSP obj_sp,
+
+ static Status ParseUsageMaskFromArray(StructuredData::ObjectSP obj_sp,
size_t counter, uint32_t &usage_mask) {
// If the usage entry is not provided, we use LLDB_OPT_SET_ALL.
// If the usage mask is a UINT, the option belongs to that group.
@@ -1309,10 +1306,10 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
usage_mask = LLDB_OPT_SET_ALL;
return error;
}
-
+
usage_mask = 0;
-
- StructuredData::UnsignedInteger *uint_val =
+
+ StructuredData::UnsignedInteger *uint_val =
obj_sp->GetAsUnsignedInteger();
if (uint_val) {
// If this is an integer, then this specifies a single group:
@@ -1332,8 +1329,8 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
}
// This is the array ForEach for accumulating a group usage mask from
// an array of string descriptions of groups.
- auto groups_accumulator
- = [counter, &usage_mask, &error]
+ auto groups_accumulator
+ = [counter, &usage_mask, &error]
(StructuredData::Object *obj) -> bool {
StructuredData::UnsignedInteger *int_val = obj->GetAsUnsignedInteger();
if (int_val) {
@@ -1351,14 +1348,14 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
error = Status::FromErrorStringWithFormatv(
"Group element not an int or array of integers for element {0}",
counter);
- return false;
+ return false;
}
size_t num_range_elem = arr_val->GetSize();
if (num_range_elem != 2) {
error = Status::FromErrorStringWithFormatv(
"Subranges of a group not a start and a stop for element {0}",
counter);
- return false;
+ return false;
}
int_val = arr_val->GetItemAtIndex(0)->GetAsUnsignedInteger();
if (!int_val) {
@@ -1366,7 +1363,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
"Start element of a subrange of a "
"group not unsigned int for element {0}",
counter);
- return false;
+ return false;
}
uint32_t start = int_val->GetValue();
int_val = arr_val->GetItemAtIndex(1)->GetAsUnsignedInteger();
@@ -1375,7 +1372,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
"End element of a subrange of a group"
" not unsigned int for element {0}",
counter);
- return false;
+ return false;
}
uint32_t end = int_val->GetValue();
if (start == 0 || end == 0 || start > end) {
@@ -1393,8 +1390,8 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
array_val->ForEach(groups_accumulator);
return error;
}
-
-
+
+
Status SetOptionsFromArray(StructuredData::Dictionary &options) {
Status error;
m_num_options = options.GetSize();
@@ -1404,11 +1401,11 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
m_usage_container.resize(m_num_options);
m_enum_storage.resize(m_num_options);
m_enum_vector.resize(m_num_options);
-
+
size_t counter = 0;
size_t short_opt_counter = 0;
// This is the Array::ForEach function for adding option elements:
- auto add_element = [this, &error, &counter, &short_opt_counter]
+ auto add_element = [this, &error, &counter, &short_opt_counter]
(llvm::StringRef long_option, StructuredData::Object *object) -> bool {
StructuredData::Dictionary *opt_dict = object->GetAsDictionary();
if (!opt_dict) {
@@ -1417,22 +1414,22 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
return false;
}
OptionDefinition &option_def = m_options_definition_up.get()[counter];
-
+
// We aren't exposing the validator yet, set it to null
option_def.validator = nullptr;
// We don't require usage masks, so set it to one group by default:
option_def.usage_mask = 1;
-
+
// Now set the fields of the OptionDefinition Array from the dictionary:
//
// Note that I don't check for unknown fields in the option dictionaries
// so a scriptor can add extra elements that are helpful when they go to
// do "set_option_value"
-
+
// Usage Mask:
StructuredData::ObjectSP obj_sp = opt_dict->GetValueForKey("groups");
if (obj_sp) {
- error = ParseUsageMaskFromArray(obj_sp, counter,
+ error = ParseUsageMaskFromArray(obj_sp, counter,
option_def.usage_mask);
if (error.Fail())
return false;
@@ -1449,15 +1446,15 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
"for option {0}",
counter);
return false;
- }
- option_def.required = boolean_val->GetValue();
+ }
+ option_def.required = boolean_val->GetValue();
}
-
+
// Short Option:
int short_option;
obj_sp = opt_dict->GetValueForKey("short_option");
if (obj_sp) {
- // The value is a string, so pull the
+ // The value is a string, so pull the
llvm::StringRef short_str = obj_sp->GetStringValue();
if (short_str.empty()) {
error = Status::FromErrorStringWithFormatv(
@@ -1474,12 +1471,12 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
}
short_option = (int) short_str[0];
} else {
- // If the short option is not provided, then we need a unique value
+ // If the short option is not provided, then we need a unique value
// less than the lowest printable ASCII character.
short_option = short_opt_counter++;
}
option_def.short_option = short_option;
-
+
// Long Option is the key from the outer dict:
if (long_option.empty()) {
error = Status::FromErrorStringWithFormatv(
@@ -1488,11 +1485,11 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
}
auto inserted = g_string_storer.insert(long_option.str());
option_def.long_option = ((*(inserted.first)).data());
-
+
// Value Type:
obj_sp = opt_dict->GetValueForKey("value_type");
if (obj_sp) {
- StructuredData::UnsignedInteger *uint_val
+ StructuredData::UnsignedInteger *uint_val
= obj_sp->GetAsUnsignedInteger();
if (!uint_val) {
error = Status::FromErrorStringWithFormatv(
@@ -1514,7 +1511,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
option_def.argument_type = eArgTypeNone;
option_def.option_has_arg = false;
}
-
+
// Completion Type:
obj_sp = opt_dict->GetValueForKey("completion_type");
if (obj_sp) {
@@ -1558,7 +1555,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
option_def.usage_text = m_usage_container[counter].data();
// Enum Values:
-
+
obj_sp = opt_dict->GetValueForKey("enum_values");
if (obj_sp) {
StructuredData::Array *array = obj_sp->GetAsArray();
@@ -1573,12 +1570,12 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
size_t enum_ctr = 0;
m_enum_storage[counter] = std::vector<EnumValueStorage>(num_elem);
std::vector<EnumValueStorage> &curr_elem = m_enum_storage[counter];
-
+
// This is the Array::ForEach function for adding enum elements:
// Since there are only two fields to specify the enum, use a simple
// two element array with value first, usage second.
// counter is only used for reporting so I pass it by value here.
- auto add_enum = [&enum_ctr, &curr_elem, counter, &error]
+ auto add_enum = [&enum_ctr, &curr_elem, counter, &error]
(StructuredData::Object *object) -> bool {
StructuredData::Array *enum_arr = object->GetAsArray();
if (!enum_arr) {
@@ -1600,7 +1597,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
StructuredData::ObjectSP obj_sp = enum_arr->GetItemAtIndex(0);
llvm::StringRef val_stref = obj_sp->GetStringValue();
std::string value_cstr_str = val_stref.str().c_str();
-
+
// Enum Usage:
obj_sp = enum_arr->GetItemAtIndex(1);
if (!obj_sp) {
@@ -1612,17 +1609,17 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
}
llvm::StringRef usage_stref = obj_sp->GetStringValue();
std::string usage_cstr_str = usage_stref.str().c_str();
- curr_elem[enum_ctr] = EnumValueStorage(value_cstr_str,
+ curr_elem[enum_ctr] = EnumValueStorage(value_cstr_str,
usage_cstr_str, enum_ctr);
-
+
enum_ctr++;
return true;
}; // end of add_enum
-
+
array->ForEach(add_enum);
if (!error.Success())
return false;
- // We have to have a vector of elements to set in the options, make
+ // We have to have a vector of elements to set in the options, make
// that here:
for (auto &elem : curr_elem)
m_enum_vector[counter].emplace_back(elem.element);
@@ -1632,7 +1629,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
counter++;
return true;
}; // end of add_element
-
+
options.ForEach(add_element);
return error;
}
@@ -1769,30 +1766,30 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
element.usage = "usage not set";
element.value = 0;
}
-
- EnumValueStorage(std::string in_str_val, std::string in_usage,
+
+ EnumValueStorage(std::string in_str_val, std::string in_usage,
size_t in_value) : value(std::move(in_str_val)), usage(std::move(in_usage)) {
SetElement(in_value);
}
-
- EnumValueStorage(const EnumValueStorage &in) : value(in.value),
+
+ EnumValueStorage(const EnumValueStorage &in) : value(in.value),
usage(in.usage) {
SetElement(in.element.value);
}
-
+
EnumValueStorage &operator=(const EnumValueStorage &in) {
value = in.value;
usage = in.usage;
SetElement(in.element.value);
return *this;
}
-
+
void SetElement(size_t in_value) {
element.value = in_value;
element.string_value = value.data();
- element.usage = usage.data();
+ element.usage = usage.data();
}
-
+
std::string value;
std::string usage;
OptionEnumValueElement element;
@@ -1803,10 +1800,10 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
// commands, so those are stored in a global set: g_string_storer.
// But the usages are much less likely to be reused, so those are stored in
// a vector in the command instance. It gets resized to the correct size
- // and then filled with null-terminated strings in the std::string, so the
+ // and then filled with null-terminated strings in the std::string, so the
// are valid C-strings that won't move around.
// The enum values and descriptions are treated similarly - these aren't
- // all that common so it's not worth the effort to dedup them.
+ // all that common so it's not worth the effort to dedup them.
size_t m_num_options = 0;
std::unique_ptr<OptionDefinition> m_options_definition_up;
std::vector<std::vector<EnumValueStorage>> m_enum_storage;
@@ -1818,15 +1815,15 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
};
public:
- static CommandObjectSP Create(CommandInterpreter &interpreter,
+ static CommandObjectSP Create(CommandInterpreter &interpreter,
std::string name,
StructuredData::GenericSP cmd_obj_sp,
- ScriptedCommandSynchronicity synch,
+ ScriptedCommandSynchronicity synch,
CommandReturnObject &result) {
CommandObjectSP new_cmd_sp(new CommandObjectScriptingObjectParsed(
interpreter, name, cmd_obj_sp, synch));
- CommandObjectScriptingObjectParsed *parsed_cmd
+ CommandObjectScriptingObjectParsed *parsed_cmd
= static_cast<CommandObjectScriptingObjectParsed *>(new_cmd_sp.get());
// Now check all the failure modes, and report if found.
Status opt_error = parsed_cmd->GetOptionsError();
@@ -1837,7 +1834,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
opt_error.AsCString());
if (arg_error.Fail())
result.AppendErrorWithFormat("%sfailed to parse argument definitions: %s",
- opt_error.Fail() ? ", also " : "",
+ opt_error.Fail() ? ", also " : "",
arg_error.AsCString());
if (!result.Succeeded())
@@ -1850,9 +1847,9 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
std::string name,
StructuredData::GenericSP cmd_obj_sp,
ScriptedCommandSynchronicity synch)
- : CommandObjectParsed(interpreter, name.c_str()),
- m_cmd_obj_sp(cmd_obj_sp), m_synchro(synch),
- m_options(interpreter, cmd_obj_sp), m_fetched_help_short(false),
+ : CommandObjectParsed(interpreter, name.c_str()),
+ m_cmd_obj_sp(cmd_obj_sp), m_synchro(synch),
+ m_options(interpreter, cmd_obj_sp), m_fetched_help_short(false),
m_fetched_help_long(false) {
StreamString stream;
ScriptInterpreter *scripter = GetDebugger().GetScriptInterpreter();
@@ -1865,14 +1862,14 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
GetFlags().Set(scripter->GetFlagsForCommandObject(cmd_obj_sp));
// Now set up the options definitions from the options:
- StructuredData::ObjectSP options_object_sp
+ StructuredData::ObjectSP options_object_sp
= scripter->GetOptionsForCommandObject(cmd_obj_sp);
// It's okay not to have an options dict.
if (options_object_sp) {
// The options come as a dictionary of dictionaries. The key of the
// outer dict is the long option name (since that's required). The
// value holds all the other option specification bits.
- StructuredData::Dictionary *options_dict
+ StructuredData::Dictionary *options_dict
= options_object_sp->GetAsDictionary();
// but if it exists, it has to be an array.
if (options_dict) {
@@ -1887,28 +1884,28 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
}
// Then fetch the args. Since the arguments can have usage masks you need
// an array of arrays.
- StructuredData::ObjectSP args_object_sp
+ StructuredData::ObjectSP args_object_sp
= scripter->GetArgumentsForCommandObject(cmd_obj_sp);
if (args_object_sp) {
- StructuredData::Array *args_array = args_object_sp->GetAsArray();
+ StructuredData::Array *args_array = args_object_sp->GetAsArray();
if (!args_array) {
m_args_error =
Status::FromErrorString("Argument specification is not an array");
return;
}
size_t counter = 0;
-
+
// This is the Array::ForEach function that handles the
// CommandArgumentEntry arrays one by one:
- auto arg_array_adder = [this, &counter] (StructuredData::Object *object)
+ auto arg_array_adder = [this, &counter] (StructuredData::Object *object)
-> bool {
// This is the Array::ForEach function to add argument entries:
CommandArgumentEntry this_entry;
size_t elem_counter = 0;
- auto args_adder = [this, counter, &elem_counter, &this_entry]
+ auto args_adder = [this, counter, &elem_counter, &this_entry]
(StructuredData::Object *object) -> bool {
// The arguments definition has three fields, the argument type, the
- // repeat and the usage mask.
+ // repeat and the usage mask.
CommandArgumentType arg_type = eArgTypeNone;
ArgumentRepetitionType arg_repetition = eArgRepeatOptional;
uint32_t arg_opt_set_association;
@@ -1927,10 +1924,10 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
return false;
}
// Argument Type:
- StructuredData::ObjectSP obj_sp
+ StructuredData::ObjectSP obj_sp
= arg_dict->GetValueForKey("arg_type");
if (obj_sp) {
- StructuredData::UnsignedInteger *uint_val
+ StructuredData::UnsignedInteger *uint_val
= obj_sp->GetAsUnsignedInteger();
if (!uint_val) {
report_error("value type must be an unsigned integer");
@@ -1958,13 +1955,13 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
return false;
}
arg_repetition = *repeat;
- }
-
+ }
+
// Usage Mask:
obj_sp = arg_dict->GetValueForKey("groups");
- m_args_error = CommandOptions::ParseUsageMaskFromArray(obj_sp,
+ m_args_error = CommandOptions::ParseUsageMaskFromArray(obj_sp,
counter, arg_opt_set_association);
- this_entry.emplace_back(arg_type, arg_repetition,
+ this_entry.emplace_back(arg_type, arg_repetition,
arg_opt_set_association);
elem_counter++;
return true;
@@ -1976,7 +1973,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
"{0} is not an array",
counter);
}
-
+
args_array->ForEach(args_adder);
if (m_args_error.Fail())
return false;
@@ -2131,7 +2128,7 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
Status error;
result.SetStatus(eReturnStatusInvalid);
-
+
if (!scripter ||
!scripter->RunScriptBasedParsedCommand(m_cmd_obj_sp, args,
m_synchro, result, error, m_exe_ctx)) {
@@ -2472,7 +2469,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
case eLazyBoolNo:
m_overwrite = false;
}
-
+
Status path_error;
m_container = GetCommandInterpreter().VerifyUserMultiwordCmdPath(
command, true, path_error);
@@ -2523,9 +2520,9 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
"'{0}'", m_options.m_class_name);
return;
}
-
+
if (m_options.m_parsed_command) {
- new_cmd_sp = CommandObjectScriptingObjectParsed::Create(m_interpreter,
+ new_cmd_sp = CommandObjectScriptingObjectParsed::Create(m_interpreter,
m_cmd_name, cmd_obj_sp, m_synchronicity, result);
if (!result.Succeeded())
return;
@@ -2534,7 +2531,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
m_interpreter, m_cmd_name, cmd_obj_sp, m_synchronicity,
m_completion_type);
}
-
+
// Assume we're going to succeed...
result.SetStatus(eReturnStatusSuccessFinishNoResult);
if (!m_container) {
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp
index a29ded846b100..c96c5158c06f6 100644
--- a/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/lldb/source/Commands/CommandObjectHelp.cpp
@@ -64,7 +64,6 @@ CommandObjectHelp::CommandOptions::GetDefinitions() {
}
void CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) {
- CommandObject::CommandMap::iterator pos;
CommandObject *cmd_obj;
const size_t argc = command.GetArgumentCount();
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 0c5456c2c3b57..a35baa7fd6d27 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2962,7 +2962,6 @@ void CommandInterpreter::HandleCommandsFromFile(
auto input_file_up =
FileSystem::Instance().Open(cmd_file, File::eOpenOptionReadOnly);
if (!input_file_up) {
- std::string error = llvm::toString(input_file_up.takeError());
result.AppendErrorWithFormatv(
"error: an error occurred read file '{0}': {1}\n", cmd_file_path,
llvm::fmt_consume(input_file_up.takeError()));
@@ -3263,8 +3262,6 @@ void CommandInterpreter::FindCommandsForApropos(llvm::StringRef search_word,
bool search_user_commands,
bool search_alias_commands,
bool search_user_mw_commands) {
- CommandObject::CommandMap::const_iterator pos;
-
if (search_builtin_commands)
FindCommandsForApropos(search_word, commands_found, commands_help,
m_command_dict);
diff --git a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
index 62c0fb0ff4eb8..7b5bcc2567dda 100644
--- a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
@@ -148,7 +148,6 @@ bool HexagonDYLDRendezvous::UpdateSOEntries() {
bool HexagonDYLDRendezvous::UpdateSOEntriesForAddition() {
SOEntry entry;
- iterator pos;
assert(m_previous.state == eAdd);
@@ -176,7 +175,6 @@ bool HexagonDYLDRendezvous::UpdateSOEntriesForAddition() {
bool HexagonDYLDRendezvous::UpdateSOEntriesForDeletion() {
SOEntryList entry_list;
- iterator pos;
assert(m_previous.state == eDelete);
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
index c2084e0322c1f..2d0eef666f688 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -497,7 +497,6 @@ bool DYLDRendezvous::RemoveSOEntriesFromRemote(
bool DYLDRendezvous::AddSOEntries() {
SOEntry entry;
- iterator pos;
assert(m_previous.state == eAdd);
@@ -525,7 +524,6 @@ bool DYLDRendezvous::AddSOEntries() {
bool DYLDRendezvous::RemoveSOEntries() {
SOEntryList entry_list;
- iterator pos;
assert(m_previous.state == eDelete);
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
index 5876c3a9434a1..eaed4e6742824 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
@@ -156,15 +156,12 @@ GDBRemoteCommunicationServerPlatform::Handle_qLaunchGDBServer(
__FUNCTION__);
ConnectionFileDescriptor file_conn;
- std::string hostname;
packet.SetFilePos(::strlen("qLaunchGDBServer;"));
llvm::StringRef name;
llvm::StringRef value;
std::optional<uint16_t> port;
while (packet.GetNameColonValue(name, value)) {
- if (name == "host")
- hostname = std::string(value);
- else if (name == "port") {
+ if (name == "port") {
// Make the Optional valid so we can use its value
port = 0;
value.getAsInteger(0, *port);
diff --git a/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp b/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp
index c92f80bc166b7..96d6910ce5ce5 100644
--- a/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp
+++ b/lldb/source/Plugins/Protocol/MCP/ProtocolServerMCP.cpp
@@ -98,8 +98,6 @@ llvm::Error ProtocolServerMCP::Start(ProtocolServer::Connection connection) {
auto listening_uris = m_listener->GetListeningConnectionURI();
if (listening_uris.empty())
return createStringError("failed to get listening connections");
- std::string address =
- llvm::join(m_listener->GetListeningConnectionURI(), ", ");
ServerInfo info{listening_uris[0]};
llvm::Expected<ServerInfoHandle> server_info_handle = ServerInfo::Write(info);
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp
index f23261d50ed4b..01ce5870a6edb 100644
--- a/lldb/source/Target/StackFrameList.cpp
+++ b/lldb/source/Target/StackFrameList.cpp
@@ -1021,7 +1021,6 @@ size_t StackFrameList::GetStatus(Stream &strm, uint32_t first_frame,
StackFrameSP selected_frame_sp =
m_thread.GetSelectedFrame(DoNoSelectMostRelevantFrame);
- std::string buffer;
std::string marker;
for (frame_idx = first_frame; frame_idx < last_frame; ++frame_idx) {
frame_sp = GetFrameAtIndex(frame_idx);
diff --git a/lldb/tools/yaml2macho-core/yaml2macho.cpp b/lldb/tools/yaml2macho-core/yaml2macho.cpp
index c29ae282d8571..cd51d228ff062 100644
--- a/lldb/tools/yaml2macho-core/yaml2macho.cpp
+++ b/lldb/tools/yaml2macho-core/yaml2macho.cpp
@@ -176,7 +176,6 @@ int main(int argc, char **argv) {
if (spec.binaries.size() > 0)
for (const Binary &binary : spec.binaries) {
std::vector<uint8_t> segment_command_bytes;
- std::vector<uint8_t> payload_bytes;
create_lc_note_binary_load_cmd(spec, segment_command_bytes, binary,
lc_note_payload_bytes, payload_fileoff);
payload_fileoff =
@@ -185,7 +184,6 @@ int main(int argc, char **argv) {
}
if (spec.addressable_bits) {
std::vector<uint8_t> segment_command_bytes;
- std::vector<uint8_t> payload_bytes;
create_lc_note_addressable_bits(spec, segment_command_bytes,
*spec.addressable_bits,
lc_note_payload_bytes, payload_fileoff);
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h
index e5d28345bb84e..0aa040bc00138 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h
@@ -188,7 +188,6 @@ class LLVM_ABI SimpleRemoteEPCServer : public SimpleRemoteEPCTransportClient {
uint64_t NextSeqNo = 0;
PendingJITDispatchResultsMap PendingJITDispatchResults;
- std::vector<sys::DynamicLibrary> Dylibs;
};
} // end namespace orc
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h b/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
index b73da194cd187..9836b7d26a871 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
@@ -59,9 +59,9 @@ class GenericNamedTask : public RTTIExtends<GenericNamedTask, Task> {
/// Generic task implementation.
template <typename FnT> class GenericNamedTaskImpl : public GenericNamedTask {
public:
- GenericNamedTaskImpl(FnT &&Fn, std::string DescBuffer)
+ GenericNamedTaskImpl(FnT &&Fn, std::string InDescBuffer)
: Fn(std::forward<FnT>(Fn)), Desc(DescBuffer.c_str()),
- DescBuffer(std::move(DescBuffer)) {}
+ DescBuffer(std::move(InDescBuffer)) {}
GenericNamedTaskImpl(FnT &&Fn, const char *Desc)
: Fn(std::forward<FnT>(Fn)), Desc(Desc) {
assert(Desc && "Description cannot be null");
diff --git a/llvm/lib/DWARFCFIChecker/DWARFCFIState.cpp b/llvm/lib/DWARFCFIChecker/DWARFCFIState.cpp
index 2c0eeac0089ae..606f5a520fd7d 100644
--- a/llvm/lib/DWARFCFIChecker/DWARFCFIState.cpp
+++ b/llvm/lib/DWARFCFIChecker/DWARFCFIState.cpp
@@ -36,7 +36,7 @@ void DWARFCFIState::update(const MCCFIInstruction &Directive) {
// updated row and following the previous rows. These middle rows are stored
// in `PrecedingRows`. For now, there is no need to store these rows in the
// state, so they are ignored in the end.
- dwarf::UnwindTable::RowContainer PrecedingRows;
+ // dwarf::UnwindTable::RowContainer PrecedingRows;
// TODO: `.cfi_remember_state` and `.cfi_restore_state` directives are not
// supported yet. The reason is that `parseRows` expects the stack of states
diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
index 4165274a6f8bd..d1c0022f71dcc 100644
--- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
+++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
@@ -88,7 +88,6 @@ static std::string DependencyInfoPath;
static bool VersionOption;
static bool NoWarningForNoSymbols;
static bool WarningsAsErrors;
-static std::string IgnoredSyslibRoot;
static const std::array<std::string, 3> StandardSearchDirs{
"/lib",
@@ -659,9 +658,6 @@ static void parseRawArgs(int Argc, char **Argv) {
if (const opt::Arg *A = Args.getLastArg(OPT_dependencyInfoPath))
DependencyInfoPath = A->getValue();
- if (const opt::Arg *A = Args.getLastArg(OPT_ignoredSyslibRoot))
- IgnoredSyslibRoot = A->getValue();
-
LibraryOperation =
Args.hasArg(OPT_static) ? Operation::Static : Operation::None;
DeterministicOption = Args.hasArg(OPT_deterministicOption);
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
index e4efc83c933b4..f28efb6de611e 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
@@ -33,8 +33,7 @@ namespace llvm {
namespace rc {
RCParser::ParserError::ParserError(const Twine &Expected, const LocIter CurLoc,
- const LocIter End)
- : ErrorLoc(CurLoc), FileEnd(End) {
+ const LocIter End) {
CurMessage = "Error parsing file: expected " + Expected.str() + ", got " +
(CurLoc == End ? "<EOF>" : CurLoc->value()).str();
}
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.h b/llvm/tools/llvm-rc/ResourceScriptParser.h
index 1e7618c84142e..ed7a09b16834e 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.h
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.h
@@ -48,7 +48,6 @@ class RCParser {
private:
std::string CurMessage;
- LocIter ErrorLoc, FileEnd;
};
explicit RCParser(std::vector<RCToken> TokenList);
diff --git a/llvm/tools/sancov/sancov.cpp b/llvm/tools/sancov/sancov.cpp
index 483e6d7d58d68..d6fdac2583d5d 100644
--- a/llvm/tools/sancov/sancov.cpp
+++ b/llvm/tools/sancov/sancov.cpp
@@ -987,7 +987,6 @@ computeNotCoveredFunctions(const SymbolizedCoverage &Coverage) {
static std::set<FileFn>
computeCoveredFunctions(const SymbolizedCoverage &Coverage) {
- auto AllFns = computeFunctions(Coverage.Points);
std::set<FileFn> Result;
for (const auto &Point : Coverage.Points) {
diff --git a/llvm/unittests/ADT/STLExtrasTest.cpp b/llvm/unittests/ADT/STLExtrasTest.cpp
index 2f1e01d16e3c5..00c062ae1ca29 100644
--- a/llvm/unittests/ADT/STLExtrasTest.cpp
+++ b/llvm/unittests/ADT/STLExtrasTest.cpp
@@ -1170,7 +1170,7 @@ TEST(STLExtrasTest, getSingleElement) {
}
TEST(STLExtrasTest, hasNItems) {
- const std::list<int> V0 = {}, V1 = {1}, V2 = {1, 2};
+ const std::list<int> V0 = {}, V1 = {1};
const std::list<int> V3 = {1, 3, 5};
EXPECT_TRUE(hasNItems(V0, 0));
@@ -1191,7 +1191,7 @@ TEST(STLExtrasTest, hasNItems) {
}
TEST(STLExtras, hasNItemsOrMore) {
- const std::list<int> V0 = {}, V1 = {1}, V2 = {1, 2};
+ const std::list<int> V1 = {1}, V2 = {1, 2};
const std::list<int> V3 = {1, 3, 5};
EXPECT_TRUE(hasNItemsOrMore(V1, 1));
diff --git a/llvm/unittests/CodeGen/PassManagerTest.cpp b/llvm/unittests/CodeGen/PassManagerTest.cpp
index dc83effd3c1e1..dc42b7a0854d3 100644
--- a/llvm/unittests/CodeGen/PassManagerTest.cpp
+++ b/llvm/unittests/CodeGen/PassManagerTest.cpp
@@ -218,7 +218,6 @@ TEST_F(PassManagerTest, Basic) {
testing::internal::CaptureStderr();
MPM.run(*M, MAM);
- std::string Output = testing::internal::GetCapturedStderr();
EXPECT_EQ((std::vector<int>{10, 16, 18, 20, 30, 36, 38, 40}), Counts);
EXPECT_EQ(40, Count);
diff --git a/llvm/unittests/TextAPI/TextStubV3Tests.cpp b/llvm/unittests/TextAPI/TextStubV3Tests.cpp
index 3c822b2188a41..19624c9dc2abb 100644
--- a/llvm/unittests/TextAPI/TextStubV3Tests.cpp
+++ b/llvm/unittests/TextAPI/TextStubV3Tests.cpp
@@ -81,10 +81,6 @@ TEST(TBDv3, ReadFile) {
for (auto &&arch : Archs)
Targets.emplace_back(Target(arch, Platform));
EXPECT_EQ(Archs, File->getArchitectures());
- TargetToAttr Uuids = {{Target(AK_armv7, PLATFORM_UNKNOWN),
- "00000000-0000-0000-0000-000000000000"},
- {Target(AK_arm64, PLATFORM_UNKNOWN),
- "11111111-1111-1111-1111-111111111111"}};
EXPECT_EQ(File->getPlatforms().size(), 1U);
EXPECT_EQ(Platform, *File->getPlatforms().begin());
EXPECT_EQ(std::string("Test.dylib"), File->getInstallName());
@@ -165,10 +161,6 @@ TEST(TBDv3, ReadMultipleDocuments) {
for (auto &&arch : Archs)
Targets.emplace_back(Target(arch, Platform));
EXPECT_EQ(Archs, File->getArchitectures());
- TargetToAttr Uuids = {{Target(AK_armv7, PLATFORM_UNKNOWN),
- "00000000-0000-0000-0000-000000000000"},
- {Target(AK_arm64, PLATFORM_UNKNOWN),
- "11111111-1111-1111-1111-111111111111"}};
EXPECT_EQ(File->getPlatforms().size(), 1U);
EXPECT_EQ(Platform, *File->getPlatforms().begin());
EXPECT_EQ(std::string("Test.dylib"), File->getInstallName());
@@ -358,7 +350,7 @@ TEST(TBDv3, WriteMultipleDocuments) {
Document.addSymbol(EncodeKind::GlobalSymbol, "_sym3", Targets);
Document.addSymbol(EncodeKind::GlobalSymbol, "_sym4", Targets);
File.addDocument(std::make_shared<InterfaceFile>(std::move(Document)));
-
+
SmallString<4096> Buffer;
raw_svector_ostream OS(Buffer);
Error Result = TextAPIWriter::writeToStream(OS, File);
diff --git a/llvm/unittests/TextAPI/TextStubV4Tests.cpp b/llvm/unittests/TextAPI/TextStubV4Tests.cpp
index 3f9d8d9b7deaa..11c485198b704 100644
--- a/llvm/unittests/TextAPI/TextStubV4Tests.cpp
+++ b/llvm/unittests/TextAPI/TextStubV4Tests.cpp
@@ -394,8 +394,6 @@ TEST(TBDv4, WriteMultipleDocuments) {
Target(AK_i386, Platform),
Target(AK_x86_64, Platform),
};
- TargetToAttr Uuids = {{Targets[0], "00000000-0000-0000-0000-000000000002"},
- {Targets[1], "11111111-1111-1111-1111-111111111112"}};
File.setInstallName("/System/Library/Frameworks/Umbrella.framework/Umbrella");
File.setFileType(FileType::TBD_V4);
File.addTargets(Targets);
@@ -409,8 +407,6 @@ TEST(TBDv4, WriteMultipleDocuments) {
Targets[1]);
// Write Second Document
- Uuids = {{Targets[0], "00000000-0000-0000-0000-000000000000"},
- {Targets[1], "11111111-1111-1111-1111-111111111111"}};
InterfaceFile Document;
Document.setInstallName("/System/Library/Frameworks/A.framework/A");
Document.setFileType(FileType::TBD_V4);
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 703f72d1ab5bc..70f4703cc5386 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -6546,7 +6546,6 @@ calculateBoundsOffset(LLVM::ModuleTranslation &moduleTranslation,
// to use or standardizing/canonicalizing the order of the bounds to compute
// the offset may be useful in the future when there's other frontends with
// different formats.
- std::vector<llvm::Value *> dimensionIndexSizeOffset;
for (int i = bounds.size() - 1; i >= 0; --i) {
if (auto boundOp = dyn_cast_if_present<omp::MapBoundsOp>(
bounds[i].getDefiningOp())) {
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 90ada40302296..ee73c9841e240 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -3429,7 +3429,6 @@ void OpEmitter::genCodeForAddingArgAndRegionForBuilder(
});
};
if (op.getTrait("::mlir::OpTrait::AttrSizedOperandSegments")) {
- std::string sizes = op.getGetterName(operandSegmentAttrName);
body << " ::llvm::copy(::llvm::ArrayRef<int32_t>({";
emitSegment();
body << "}), " << builderOpStateProperties
More information about the Mlir-commits
mailing list