mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[BOLT] Ignore empty funcs in relocation mode
Summary: Make BOLT ignore empty functions (those containing no instructions, despite having some space allocated to it filled with zeroes). (cherry picked from FBD15981683)
This commit is contained in:
committed by
Maksim Panchenko
parent
bda13b7dd8
commit
db02a1a142
@@ -1329,6 +1329,12 @@ void BinaryFunction::postProcessEntryPoints() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If we are at Offset 0 and there is no instruction associated with it,
|
||||
// this means this is an empty function. Just ignore.
|
||||
if (Offset == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
errs() << "BOLT-WARNING: reference in the middle of instruction "
|
||||
"detected in function " << *this
|
||||
<< " at offset 0x" << Twine::utohexstr(Offset) << '\n';
|
||||
|
||||
Reference in New Issue
Block a user