xref: /aosp_15_r20/external/llvm/lib/Support/README.txt.system (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard WorkerDesign Of lib/System
2*9880d681SAndroid Build Coastguard Worker====================
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard WorkerThe software in this directory is designed to completely shield LLVM from any
5*9880d681SAndroid Build Coastguard Workerand all operating system specific functionality. It is not intended to be a
6*9880d681SAndroid Build Coastguard Workercomplete operating system wrapper (such as ACE), but only to provide the
7*9880d681SAndroid Build Coastguard Workerfunctionality necessary to support LLVM.
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard WorkerThe software located here, of necessity, has very specific and stringent design
10*9880d681SAndroid Build Coastguard Workerrules. Violation of these rules means that cracks in the shield could form and
11*9880d681SAndroid Build Coastguard Workerthe primary goal of the library is defeated. By consistently using this library,
12*9880d681SAndroid Build Coastguard WorkerLLVM becomes more easily ported to new platforms since the only thing requiring
13*9880d681SAndroid Build Coastguard Workerporting is this library.
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard WorkerComplete documentation for the library can be found in the file:
16*9880d681SAndroid Build Coastguard Worker  llvm/docs/SystemLibrary.html
17*9880d681SAndroid Build Coastguard Workeror at this URL:
18*9880d681SAndroid Build Coastguard Worker  http://llvm.org/docs/SystemLibrary.html
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard WorkerWhile we recommend that you read the more detailed documentation, for the
21*9880d681SAndroid Build Coastguard Workerimpatient, here's a high level summary of the library's requirements.
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker 1. No system header files are to be exposed through the interface.
24*9880d681SAndroid Build Coastguard Worker 2. Std C++ and Std C header files are okay to be exposed through the interface.
25*9880d681SAndroid Build Coastguard Worker 3. No exposed system-specific functions.
26*9880d681SAndroid Build Coastguard Worker 4. No exposed system-specific data.
27*9880d681SAndroid Build Coastguard Worker 5. Data in lib/System classes must use only simple C++ intrinsic types.
28*9880d681SAndroid Build Coastguard Worker 6. Errors are handled by returning "true" and setting an optional std::string
29*9880d681SAndroid Build Coastguard Worker 7. Library must not throw any exceptions, period.
30*9880d681SAndroid Build Coastguard Worker 8. Interface functions must not have throw() specifications.
31*9880d681SAndroid Build Coastguard Worker 9. No duplicate function impementations are permitted within an operating
32*9880d681SAndroid Build Coastguard Worker    system class.
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard WorkerTo accomplish these requirements, the library has numerous design criteria that
35*9880d681SAndroid Build Coastguard Workermust be satisfied. Here's a high level summary of the library's design criteria:
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Worker 1. No unused functionality (only what LLVM needs)
38*9880d681SAndroid Build Coastguard Worker 2. High-Level Interfaces
39*9880d681SAndroid Build Coastguard Worker 3. Use Opaque Classes
40*9880d681SAndroid Build Coastguard Worker 4. Common Implementations
41*9880d681SAndroid Build Coastguard Worker 5. Multiple Implementations
42*9880d681SAndroid Build Coastguard Worker 6. Minimize Memory Allocation
43*9880d681SAndroid Build Coastguard Worker 7. No Virtual Methods
44