[Mlir-commits] [mlir] 02cb21d - Make helpers static. NFC.

Benjamin Kramer llvmlistbot at llvm.org
Fri Apr 3 03:48:39 PDT 2020


Author: Benjamin Kramer
Date: 2020-04-03T12:48:25+02:00
New Revision: 02cb21df3f4a8c27f3c84fc27e435433fe7f5653

URL: https://github.com/llvm/llvm-project/commit/02cb21df3f4a8c27f3c84fc27e435433fe7f5653
DIFF: https://github.com/llvm/llvm-project/commit/02cb21df3f4a8c27f3c84fc27e435433fe7f5653.diff

LOG: Make helpers static. NFC.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
    lld/COFF/InputFiles.cpp
    mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index d30552734679..2e30a3b403e8 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -296,8 +296,8 @@ static bool IsNOLINTFound(StringRef NolintDirectiveText, StringRef Line,
   return true;
 }
 
-llvm::Optional<StringRef> getBuffer(const SourceManager &SM, FileID File,
-                                    bool AllowIO) {
+static llvm::Optional<StringRef> getBuffer(const SourceManager &SM, FileID File,
+                                           bool AllowIO) {
   // This is similar to the implementation of SourceManager::getBufferData(),
   // but uses ContentCache::getRawBuffer() rather than getBuffer() if
   // AllowIO=false, to avoid triggering file I/O if the file contents aren't

diff  --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index 8cf2a037af54..afe8ef455336 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -829,7 +829,7 @@ Optional<DILineInfo> ObjFile::getDILineInfo(uint32_t offset,
   return dwarf->getDILineInfo(offset, sectionIndex);
 }
 
-StringRef ltrim1(StringRef s, const char *chars) {
+static StringRef ltrim1(StringRef s, const char *chars) {
   if (!s.empty() && strchr(chars, s[0]))
     return s.substr(1);
   return s;

diff  --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 077b34c320ec..24dcf7370943 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -862,7 +862,7 @@ static LogicalResult verify(ConvOp op) {
 }
 
 template <typename PoolingOp>
-LogicalResult verifySingleInputPoolingOp(PoolingOp op) {
+static LogicalResult verifySingleInputPoolingOp(PoolingOp op) {
   auto inputType = op.input().getType().template cast<MemRefType>();
   auto outputType = op.output().getType().template cast<MemRefType>();
   if (outputType.getElementType() != inputType.getElementType())


        


More information about the Mlir-commits mailing list