mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
Add unreachable to avoid GCC -Wreturn-type warning
GCC warns of control reaching end of non-void function (-Wreturn-type). Closes tensorflow/mlir#75 PiperOrigin-RevId: 263214601
This commit is contained in:
committed by
A. Unique TensorFlower
parent
b09dfcb1d7
commit
12ff145ebf
@@ -193,6 +193,7 @@ int tblgen::SymbolInfoMap::SymbolInfo::getStaticValueCount() const {
|
||||
case Kind::Result:
|
||||
return op->getNumResults();
|
||||
}
|
||||
llvm_unreachable("unknown kind");
|
||||
}
|
||||
|
||||
std::string
|
||||
@@ -212,6 +213,7 @@ tblgen::SymbolInfoMap::SymbolInfo::getVarDecl(StringRef name) const {
|
||||
return formatv("{0} {1};\n", op->getQualCppClassName(), name);
|
||||
}
|
||||
}
|
||||
llvm_unreachable("unknown kind");
|
||||
}
|
||||
|
||||
std::string
|
||||
@@ -243,6 +245,7 @@ tblgen::SymbolInfoMap::SymbolInfo::getValueAndRangeUse(StringRef name,
|
||||
return name;
|
||||
}
|
||||
}
|
||||
llvm_unreachable("unknown kind");
|
||||
}
|
||||
|
||||
bool tblgen::SymbolInfoMap::bindOpArgument(StringRef symbol, const Operator &op,
|
||||
|
||||
Reference in New Issue
Block a user