[LLVMbugs] [Bug 351] NEW: Consolidate Operating System Abstraction Layer

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri May 28 22:09:41 PDT 2004


           Summary: Consolidate Operating System Abstraction Layer
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Support Libraries
        AssignedTo: rspencer at x10sys.com
        ReportedBy: rspencer at x10sys.com

Although LLVM purposely doesn't use much of an operating system's functionality,
it does use some and its current implementation is somewhat Unix and Linux
specific. The purpose of this is to create a "System" module that will hide all
operating system dependencies from LLVM. Specifically this will involve:

1. include/llvm/System
A set of header files that provide C++ abstractions like Path, File, Directory,
Shared Object (Dynamic Link Library), Process, Mutex, Guard, Thread (maybe), and
abstractions for other operating system objects used by LLVM. Only those
abstractions actually used by LLVM will be included.

2. lib/System
Implementation of the abstractions. The design will be based on the operating
system abstraction layer in XPS. This design enforces that (a) there will be
zero visibility of operating system specific header files through the interface
(STL header excepted), (b) the abstractions will be provided in C++ classes that
allocate no memory so they are suitable for quick allocation on the stack, (c)
there are no polymorphic methods, (d) implementation of operating system
specific methods is in operating system specific sub-directories, (e) methods
throw no exceptions and are declared with throw() to enforce this, (f) operating
system error handling will be coalesced into a very lightweight ErrorCode object
that can assist with interpretation of the error. Most of these requirements are
aimed at making the abstraction layer very light weight but providing complete
sheilding of LLVM from the operating system.

3. The initial implementation will be for Linux. A second implementation based
on the Apache Portable Runtime is planned. Chris volunteered to implement the
win32 implementation. We'll need Mac OS X and Solaris implementations as well
which I will plagarize from the Linux implementation because of similarities.
However, someone with those platforms will have to actually compile and
implement the abstractions for those platforms because I don't have them (yet!)
4. Conversion of LLVM won't happen until all needed platforms pass a battery of
tests to ensure that the System library functions correctly on each platform.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list