@@ -825,47 +825,46 @@ class JITDylib {
825
825
// / have been added and not yet removed).
826
826
void removeGenerator (DefinitionGenerator &G);
827
827
828
- // / Set the search order to be used when fixing up definitions in JITDylib.
829
- // / This will replace the previous search order, and apply to any symbol
828
+ // / Set the link order to be used when fixing up definitions in JITDylib.
829
+ // / This will replace the previous link order, and apply to any symbol
830
830
// / resolutions made for definitions in this JITDylib after the call to
831
- // / setSearchOrder (even if the definition itself was added before the
831
+ // / setLinkOrder (even if the definition itself was added before the
832
832
// / call).
833
833
// /
834
- // / If SearchThisJITDylibFirst is set, which by default it is, then this
835
- // / JITDylib will add itself to the beginning of the SearchOrder (Clients
836
- // / should *not* put this JITDylib in the list in this case, to avoid
837
- // / redundant lookups).
834
+ // / If LinkAgainstThisJITDylibFirst is true (the default) then this JITDylib
835
+ // / will add itself to the beginning of the LinkOrder (Clients should not
836
+ // / put this JITDylib in the list in this case, to avoid redundant lookups).
838
837
// /
839
- // / If SearchThisJITDylibFirst is false then the search order will be used as
840
- // / given . The main motivation for this feature is to support deliberate
838
+ // / If LinkAgainstThisJITDylibFirst is false then the link order will be used
839
+ // / as-is . The primary motivation for this feature is to support deliberate
841
840
// / shadowing of symbols in this JITDylib by a facade JITDylib. For example,
842
841
// / the facade may resolve function names to stubs, and the stubs may compile
843
842
// / lazily by looking up symbols in this dylib. Adding the facade dylib
844
- // / as the first in the search order (instead of this dylib) ensures that
843
+ // / as the first in the link order (instead of this dylib) ensures that
845
844
// / definitions within this dylib resolve to the lazy-compiling stubs,
846
845
// / rather than immediately materializing the definitions in this dylib.
847
- void setSearchOrder (JITDylibSearchOrder NewSearchOrder,
848
- bool SearchThisJITDylibFirst = true );
846
+ void setLinkOrder (JITDylibSearchOrder NewSearchOrder,
847
+ bool LinkAgainstThisJITDylibFirst = true );
849
848
850
- // / Add the given JITDylib to the search order for definitions in this
849
+ // / Add the given JITDylib to the link order for definitions in this
851
850
// / JITDylib.
852
- void addToSearchOrder (JITDylib &JD,
853
- JITDylibLookupFlags JDLookupFlags =
854
- JITDylibLookupFlags::MatchExportedSymbolsOnly);
851
+ void addToLinkOrder (JITDylib &JD,
852
+ JITDylibLookupFlags JDLookupFlags =
853
+ JITDylibLookupFlags::MatchExportedSymbolsOnly);
855
854
856
- // / Replace OldJD with NewJD in the search order if OldJD is present.
855
+ // / Replace OldJD with NewJD in the link order if OldJD is present.
857
856
// / Otherwise this operation is a no-op.
858
- void replaceInSearchOrder (JITDylib &OldJD, JITDylib &NewJD,
859
- JITDylibLookupFlags JDLookupFlags =
860
- JITDylibLookupFlags::MatchExportedSymbolsOnly);
857
+ void replaceInLinkOrder (JITDylib &OldJD, JITDylib &NewJD,
858
+ JITDylibLookupFlags JDLookupFlags =
859
+ JITDylibLookupFlags::MatchExportedSymbolsOnly);
861
860
862
- // / Remove the given JITDylib from the search order for this JITDylib if it is
861
+ // / Remove the given JITDylib from the link order for this JITDylib if it is
863
862
// / present. Otherwise this operation is a no-op.
864
- void removeFromSearchOrder (JITDylib &JD);
863
+ void removeFromLinkOrder (JITDylib &JD);
865
864
866
- // / Do something with the search order (run under the session lock).
865
+ // / Do something with the link order (run under the session lock).
867
866
template <typename Func>
868
- auto withSearchOrderDo (Func &&F)
867
+ auto withLinkOrderDo (Func &&F)
869
868
-> decltype(F(std::declval<const JITDylibSearchOrder &>()));
870
869
871
870
// / Define all symbols provided by the materialization unit to be part of this
@@ -1049,7 +1048,7 @@ class JITDylib {
1049
1048
UnmaterializedInfosMap UnmaterializedInfos;
1050
1049
MaterializingInfosMap MaterializingInfos;
1051
1050
std::vector<std::unique_ptr<DefinitionGenerator>> DefGenerators;
1052
- JITDylibSearchOrder SearchOrder ;
1051
+ JITDylibSearchOrder LinkOrder ;
1053
1052
};
1054
1053
1055
1054
// / Platforms set up standard symbols and mediate interactions between dynamic
@@ -1297,9 +1296,9 @@ GeneratorT &JITDylib::addGenerator(std::unique_ptr<GeneratorT> DefGenerator) {
1297
1296
}
1298
1297
1299
1298
template <typename Func>
1300
- auto JITDylib::withSearchOrderDo (Func &&F)
1299
+ auto JITDylib::withLinkOrderDo (Func &&F)
1301
1300
-> decltype(F(std::declval<const JITDylibSearchOrder &>())) {
1302
- return ES.runSessionLocked ([&]() { return F (SearchOrder ); });
1301
+ return ES.runSessionLocked ([&]() { return F (LinkOrder ); });
1303
1302
}
1304
1303
1305
1304
template <typename MaterializationUnitType>
0 commit comments