README.txt.system 1.9 KB

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