forked from OSchip/llvm-project
[find-all-symbols] Implement operator== for SymbolAndSignals and SymbolInfo::Signals.
llvm-svn: 296461
This commit is contained in:
parent
d6fc6730ce
commit
d09ed40e95
|
@ -113,6 +113,14 @@ SymbolInfo::Signals SymbolInfo::Signals::operator+(const Signals &RHS) const {
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SymbolInfo::Signals::operator==(const Signals &RHS) const {
|
||||||
|
return std::tie(Seen, Used) == std::tie(RHS.Seen, RHS.Used);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SymbolAndSignals::operator==(const SymbolAndSignals& RHS) const {
|
||||||
|
return std::tie(Symbol, Signals) == std::tie(RHS.Symbol, RHS.Signals);
|
||||||
|
}
|
||||||
|
|
||||||
bool WriteSymbolInfosToStream(llvm::raw_ostream &OS,
|
bool WriteSymbolInfosToStream(llvm::raw_ostream &OS,
|
||||||
const SymbolInfo::SignalMap &Symbols) {
|
const SymbolInfo::SignalMap &Symbols) {
|
||||||
llvm::yaml::Output yout(OS);
|
llvm::yaml::Output yout(OS);
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
|
|
||||||
Signals &operator+=(const Signals &RHS);
|
Signals &operator+=(const Signals &RHS);
|
||||||
Signals operator+(const Signals &RHS) const;
|
Signals operator+(const Signals &RHS) const;
|
||||||
|
bool operator==(const Signals &RHS) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
using SignalMap = std::map<SymbolInfo, Signals>;
|
using SignalMap = std::map<SymbolInfo, Signals>;
|
||||||
|
@ -128,6 +129,7 @@ private:
|
||||||
struct SymbolAndSignals {
|
struct SymbolAndSignals {
|
||||||
SymbolInfo Symbol;
|
SymbolInfo Symbol;
|
||||||
SymbolInfo::Signals Signals;
|
SymbolInfo::Signals Signals;
|
||||||
|
bool operator==(const SymbolAndSignals& RHS) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Write SymbolInfos to a stream (YAML format).
|
/// \brief Write SymbolInfos to a stream (YAML format).
|
||||||
|
|
Loading…
Reference in New Issue