File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed
Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -1383,11 +1383,6 @@ class BinaryFunction {
13831383 // / Return true if the function should not have associated symbol table entry.
13841384 bool isAnonymous () const { return IsAnonymous; }
13851385
1386- // / Return true if we can allow the execution of the original body of the
1387- // / function and its rewritten copy. This means, e.g., that metadata
1388- // / associated with the function can be duplicated/cloned.
1389- bool canClone () const ;
1390-
13911386 // / If this function was folded, return the function it was folded into.
13921387 BinaryFunction *getFoldedIntoFunction () const { return FoldedIntoFunction; }
13931388
Original file line number Diff line number Diff line change @@ -3753,14 +3753,6 @@ void BinaryFunction::postProcessBranches() {
37533753 assert (validateCFG () && " invalid CFG" );
37543754}
37553755
3756- bool BinaryFunction::canClone () const {
3757- if (opts::Instrument)
3758- return false ;
3759-
3760- // Check for the presence of metadata that cannot be duplicated.
3761- return !hasEHRanges () && !hasSDTMarker () && !hasPseudoProbe () && !hasORC ();
3762- }
3763-
37643756MCSymbol *BinaryFunction::addEntryPointAtOffset (uint64_t Offset) {
37653757 assert (Offset && " cannot add primary entry point" );
37663758 assert (CurrentState == State::Empty || CurrentState == State::Disassembled);
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ Error PatchEntries::runOnFunctions(BinaryContext &BC) {
6666 continue ;
6767
6868 // Check if we can skip patching the function.
69- if (!opts::ForcePatch && !Function.needsPatch () && Function. canClone () &&
70- Function.getSize () < PatchThreshold)
69+ if (!opts::ForcePatch && !Function.hasEHRanges () &&
70+ !Function. needsPatch () && Function.getSize () < PatchThreshold)
7171 continue ;
7272
7373 // List of patches for function entries. We either successfully patch
You can’t perform that action at this time.
0 commit comments