/// This is a separate class from FunctionInfo to enable lazy reading of this
/// function summary information from the combined index file during imporing.
class FunctionSummary {
- private:
+private:
/// \brief Path of module containing function IR, used to locate module when
/// importing this function.
///
/// during the initial compile step when the function index is first built.
unsigned InstCount;
- public:
+public:
/// Construct a summary object from summary data expected for all
/// summary records.
FunctionSummary(unsigned NumInsts) : InstCount(NumInsts) {}
/// record. After parsing the associated summary information from the summary
/// block the \a FunctionSummary is populated and stored here.
class FunctionInfo {
- private:
+private:
/// Function summary information used to help make ThinLTO importing
/// decisions.
std::unique_ptr<FunctionSummary> Summary;
/// VST records with the summary records.
uint64_t BitcodeIndex;
- public:
+public:
/// Constructor used during parsing of VST entries.
FunctionInfo(uint64_t FuncOffset)
: Summary(nullptr), BitcodeIndex(FuncOffset) {}
/// Class to hold module path string table and function map,
/// and encapsulate methods for operating on them.
class FunctionInfoIndex {
- private:
+private:
/// Map from function name to list of function information instances
/// for functions of that name (may be duplicates in the COMDAT case, e.g.).
FunctionInfoMapTy FunctionMap;
/// Holds strings for combined index, mapping to the corresponding module ID.
ModulePathStringTableTy ModulePathStringTable;
- public:
+public:
FunctionInfoIndex() = default;
~FunctionInfoIndex() = default;
}
/// Iterator to allow writer to walk through table during emission.
- iterator_range<StringMap<uint64_t>::const_iterator> modPathStringEntries()
- const {
+ iterator_range<StringMap<uint64_t>::const_iterator>
+ modPathStringEntries() const {
return llvm::make_range(ModulePathStringTable.begin(),
ModulePathStringTable.end());
}
}
};
-} // End llvm namespace
+} // End llvm namespace
#endif