[BOLT][NFC] Move BAT::fetchParentAddress to header (#93061)
Unbreak shared build after https://github.com/llvm/llvm-project/pull/91683
This commit is contained in:
@@ -107,7 +107,12 @@ public:
|
||||
|
||||
/// If available, fetch the address of the hot part linked to the cold part
|
||||
/// at \p Address. Return 0 otherwise.
|
||||
uint64_t fetchParentAddress(uint64_t Address) const;
|
||||
uint64_t fetchParentAddress(uint64_t Address) const {
|
||||
auto Iter = ColdPartSource.find(Address);
|
||||
if (Iter == ColdPartSource.end())
|
||||
return 0;
|
||||
return Iter->second;
|
||||
}
|
||||
|
||||
/// True if the input binary has a translation table we can use to convert
|
||||
/// addresses when aggregating profile
|
||||
|
||||
@@ -547,13 +547,6 @@ BoltAddressTranslation::getFallthroughsInTrace(uint64_t FuncAddress,
|
||||
return Res;
|
||||
}
|
||||
|
||||
uint64_t BoltAddressTranslation::fetchParentAddress(uint64_t Address) const {
|
||||
auto Iter = ColdPartSource.find(Address);
|
||||
if (Iter == ColdPartSource.end())
|
||||
return 0;
|
||||
return Iter->second;
|
||||
}
|
||||
|
||||
bool BoltAddressTranslation::enabledFor(
|
||||
llvm::object::ELFObjectFileBase *InputFile) const {
|
||||
for (const SectionRef &Section : InputFile->sections()) {
|
||||
|
||||
Reference in New Issue
Block a user