File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -624,14 +624,11 @@ struct PluginManager {
624
624
// Work around for plugins that call dlopen on shared libraries that call
625
625
// tgt_register_lib during their initialisation. Stash the pointers in a
626
626
// vector until the plugins are all initialised and then register them.
627
- bool maybeDelayRegisterLib (__tgt_bin_desc *Desc) {
628
- if (!RTLsLoaded) {
629
- // Only reachable from libomptarget constructor
630
- DelayedBinDesc.push_back (Desc);
631
- return true ;
632
- } else {
627
+ bool delayRegisterLib (__tgt_bin_desc *Desc) {
628
+ if (RTLsLoaded)
633
629
return false ;
634
- }
630
+ DelayedBinDesc.push_back (Desc);
631
+ return true ;
635
632
}
636
633
637
634
void registerDelayedLibraries () {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ EXTERN void __tgt_register_requires(int64_t Flags) {
42
42
// / adds a target shared library to the target execution image
43
43
EXTERN void __tgt_register_lib (__tgt_bin_desc *Desc) {
44
44
TIMESCOPE ();
45
- if (PM->maybeDelayRegisterLib (Desc))
45
+ if (PM->delayRegisterLib (Desc))
46
46
return ;
47
47
48
48
PM->RTLs .registerLib (Desc);
You can’t perform that action at this time.
0 commit comments