forked from OSchip/llvm-project
[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:
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';
|
||||
|
|
Loading…
Reference in New Issue