Skip to content

Commit 801067f

Browse files
committed
[mlir][lldb] Fix several gcc warnings in mlir and lldb
These warnings are raised when compiling with gcc due to either having too few or too many commas, or in the case of lldb, the possibility of a nullptr. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D97586
1 parent 54e2876 commit 801067f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lldb/source/Commands/CommandObjectTrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class CommandObjectTraceLoad : public CommandObjectParsed {
116116
Trace::FindPlugin(GetDebugger(), *session_file,
117117
json_file.GetDirectory().AsCString())) {
118118
lldb::TraceSP trace_sp = traceOrErr.get();
119-
if (m_options.m_verbose)
119+
if (m_options.m_verbose && trace_sp)
120120
result.AppendMessageWithFormat("loading trace with plugin %s\n",
121121
trace_sp->GetPluginName().AsCString());
122122
} else

mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using namespace mlir;
2727
/// attribute.
2828
static uint64_t getFirstIntValue(ArrayAttr attr) {
2929
return (*attr.getAsValueRange<IntegerAttr>().begin()).getZExtValue();
30-
};
30+
}
3131

3232
namespace {
3333

mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ struct LinalgOpConfig {
129129
// Mapping traits.
130130
//===----------------------------------------------------------------------===//
131131

132-
LLVM_YAML_IS_SEQUENCE_VECTOR(LinalgTensorDef);
133-
LLVM_YAML_IS_SEQUENCE_VECTOR(SerializedAffineMap);
134-
LLVM_YAML_IS_SEQUENCE_VECTOR(LinalgIteratorTypeDef);
135-
LLVM_YAML_IS_SEQUENCE_VECTOR(ScalarAssign);
136-
LLVM_YAML_IS_SEQUENCE_VECTOR(ScalarExpression);
137-
LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(LinalgOpConfig);
132+
LLVM_YAML_IS_SEQUENCE_VECTOR(LinalgTensorDef)
133+
LLVM_YAML_IS_SEQUENCE_VECTOR(SerializedAffineMap)
134+
LLVM_YAML_IS_SEQUENCE_VECTOR(LinalgIteratorTypeDef)
135+
LLVM_YAML_IS_SEQUENCE_VECTOR(ScalarAssign)
136+
LLVM_YAML_IS_SEQUENCE_VECTOR(ScalarExpression)
137+
LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(LinalgOpConfig)
138138

139139
namespace llvm {
140140
namespace yaml {

0 commit comments

Comments
 (0)