[Libomptarget][NFC] Move global Libomptarget state to a struct
authorAtmn Patel <a335pate@uwaterloo.ca>
Fri, 30 Oct 2020 05:04:34 +0000 (01:04 -0400)
committerAtmn Patel <a335pate@uwaterloo.ca>
Tue, 3 Nov 2020 05:10:18 +0000 (00:10 -0500)
commita95b25b29ecf498afa17ad526226ae3a4271d228
tree484c9a1d493a1cfee06e176c1d1cdd4bf278e41a
parent0d4e1729e36f6db464adf8342efce9734a1ec1ea
[Libomptarget][NFC] Move global Libomptarget state to a struct

Presently, there a number of global variables in libomptarget (devices,
RTLs, tables, mutexes, etc.) that are not placed within a struct. This
patch places them into a struct ``PluginManager``. All of the functions
that act on this data remain free.

Differential Revision: https://reviews.llvm.org/D90519
openmp/libomptarget/src/api.cpp
openmp/libomptarget/src/device.cpp
openmp/libomptarget/src/device.h
openmp/libomptarget/src/interface.cpp
openmp/libomptarget/src/omptarget.cpp
openmp/libomptarget/src/private.h
openmp/libomptarget/src/rtl.cpp
openmp/libomptarget/src/rtl.h