Make helpers static. NFC.

This commit is contained in:
Benjamin Kramer 2020-04-03 12:45:18 +02:00
parent da74537e87
commit 02cb21df3f
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;

View File

@ -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())