forked from OSchip/llvm-project
[include-fixer] Inline trivial methods.
Putting them into the .cpp file is both more verbose and slower than having them in the header. No functional change intended. llvm-svn: 271285
This commit is contained in:
parent
99985b864b
commit
a3f3a7bdd8
|
@ -78,20 +78,6 @@ SymbolInfo::SymbolInfo(llvm::StringRef Name, SymbolKind Type,
|
||||||
: Name(Name), Type(Type), FilePath(FilePath), Contexts(Contexts),
|
: Name(Name), Type(Type), FilePath(FilePath), Contexts(Contexts),
|
||||||
LineNumber(LineNumber), NumOccurrences(NumOccurrences) {}
|
LineNumber(LineNumber), NumOccurrences(NumOccurrences) {}
|
||||||
|
|
||||||
llvm::StringRef SymbolInfo::getName() const { return Name; }
|
|
||||||
|
|
||||||
SymbolKind SymbolInfo::getSymbolKind() const { return Type; }
|
|
||||||
|
|
||||||
llvm::StringRef SymbolInfo::getFilePath() const { return FilePath; }
|
|
||||||
|
|
||||||
const std::vector<SymbolInfo::Context> &SymbolInfo::getContexts() const {
|
|
||||||
return Contexts;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SymbolInfo::getLineNumber() const { return LineNumber; }
|
|
||||||
|
|
||||||
unsigned SymbolInfo::getNumOccurrences() const { return NumOccurrences; }
|
|
||||||
|
|
||||||
bool SymbolInfo::operator==(const SymbolInfo &Symbol) const {
|
bool SymbolInfo::operator==(const SymbolInfo &Symbol) const {
|
||||||
return std::tie(Name, Type, FilePath, LineNumber, Contexts) ==
|
return std::tie(Name, Type, FilePath, LineNumber, Contexts) ==
|
||||||
std::tie(Symbol.Name, Symbol.Type, Symbol.FilePath, Symbol.LineNumber,
|
std::tie(Symbol.Name, Symbol.Type, Symbol.FilePath, Symbol.LineNumber,
|
||||||
|
|
|
@ -55,22 +55,24 @@ public:
|
||||||
unsigned NumOccurrences = 0);
|
unsigned NumOccurrences = 0);
|
||||||
|
|
||||||
/// \brief Get symbol name.
|
/// \brief Get symbol name.
|
||||||
llvm::StringRef getName() const;
|
llvm::StringRef getName() const { return Name; }
|
||||||
|
|
||||||
/// \brief Get symbol type.
|
/// \brief Get symbol type.
|
||||||
SymbolKind getSymbolKind() const;
|
SymbolKind getSymbolKind() const { return Type; }
|
||||||
|
|
||||||
/// \brief Get a relative file path where symbol comes from.
|
/// \brief Get a relative file path where symbol comes from.
|
||||||
llvm::StringRef getFilePath() const;
|
llvm::StringRef getFilePath() const { return FilePath; }
|
||||||
|
|
||||||
/// \brief Get symbol contexts.
|
/// \brief Get symbol contexts.
|
||||||
const std::vector<SymbolInfo::Context> &getContexts() const;
|
const std::vector<SymbolInfo::Context> &getContexts() const {
|
||||||
|
return Contexts;
|
||||||
|
}
|
||||||
|
|
||||||
/// \brief Get a 1-based line number of the symbol's declaration.
|
/// \brief Get a 1-based line number of the symbol's declaration.
|
||||||
int getLineNumber() const;
|
int getLineNumber() const { return LineNumber; }
|
||||||
|
|
||||||
/// \brief The number of times this symbol was found during an indexing run.
|
/// \brief The number of times this symbol was found during an indexing run.
|
||||||
unsigned getNumOccurrences() const;
|
unsigned getNumOccurrences() const { return NumOccurrences; }
|
||||||
|
|
||||||
bool operator<(const SymbolInfo &Symbol) const;
|
bool operator<(const SymbolInfo &Symbol) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue