projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b09dfcb
)
Add unreachable to avoid GCC -Wreturn-type warning
author
jpienaar
<jpienaar@google.com>
Tue, 13 Aug 2019 21:22:58 +0000
(14:22 -0700)
committer
A. Unique TensorFlower
<gardener@tensorflow.org>
Tue, 13 Aug 2019 21:23:28 +0000
(14:23 -0700)
GCC warns of control reaching end of non-void function (-Wreturn-type).
Closes tensorflow/mlir#75
PiperOrigin-RevId:
263214601
mlir/lib/TableGen/Pattern.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/TableGen/Pattern.cpp
b/mlir/lib/TableGen/Pattern.cpp
index
51e4c3b
..
344bcaa
100644
(file)
--- a/
mlir/lib/TableGen/Pattern.cpp
+++ b/
mlir/lib/TableGen/Pattern.cpp
@@
-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,