Skip to content

Commit 392d03f

Browse files
committed
[MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in TranslateToCpp.cpp (NFC)
1 parent e41a1bd commit 392d03f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mlir/lib/Target/Cpp/TranslateToCpp.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ using llvm::formatv;
3535
/// on each element doesn't return a string.
3636
template <typename ForwardIterator, typename UnaryFunctor,
3737
typename NullaryFunctor>
38-
inline LogicalResult
38+
static inline LogicalResult
3939
interleaveWithError(ForwardIterator begin, ForwardIterator end,
4040
UnaryFunctor eachFn, NullaryFunctor betweenFn) {
4141
if (begin == end)
@@ -52,16 +52,16 @@ interleaveWithError(ForwardIterator begin, ForwardIterator end,
5252
}
5353

5454
template <typename Container, typename UnaryFunctor, typename NullaryFunctor>
55-
inline LogicalResult interleaveWithError(const Container &c,
56-
UnaryFunctor eachFn,
57-
NullaryFunctor betweenFn) {
55+
static inline LogicalResult interleaveWithError(const Container &c,
56+
UnaryFunctor eachFn,
57+
NullaryFunctor betweenFn) {
5858
return interleaveWithError(c.begin(), c.end(), eachFn, betweenFn);
5959
}
6060

6161
template <typename Container, typename UnaryFunctor>
62-
inline LogicalResult interleaveCommaWithError(const Container &c,
63-
raw_ostream &os,
64-
UnaryFunctor eachFn) {
62+
static inline LogicalResult interleaveCommaWithError(const Container &c,
63+
raw_ostream &os,
64+
UnaryFunctor eachFn) {
6565
return interleaveWithError(c.begin(), c.end(), eachFn, [&]() { os << ", "; });
6666
}
6767

@@ -1787,7 +1787,7 @@ LogicalResult CppEmitter::emitType(Location loc, Type type) {
17871787
case 16: {
17881788
if (llvm::isa<Float16Type>(type))
17891789
return (os << "_Float16"), success();
1790-
else if (llvm::isa<BFloat16Type>(type))
1790+
if (llvm::isa<BFloat16Type>(type))
17911791
return (os << "__bf16"), success();
17921792
else
17931793
return emitError(loc, "cannot emit float type ") << type;

0 commit comments

Comments
 (0)