Displaying 2 results from an estimated 2 matches for "__llvm_errno".
2019 Jun 27
2
A libc in LLVM
...ty as it seems.
The standard allows errno to be a macro. Hence, for the transitory
phase, implementations and redirectors in our libc can make use of the
errno from the system libc. Something like this:
$> cat llvm-errno.cpp
#include <errno.h> // This is the system-libc header file
int *__llvm_errno() {
return &errno;
}
$> cat errno.h # This is the llvm libc's errno.h
int *__llvm_errno();
#define errno (*__llvm_errno())
On Tue, Jun 25, 2019 at 6:20 PM Finkel, Hal J. <hfinkel at anl.gov> wrote:
> You certainly can't mix-and-match on a per-function level, in general...
2019 Jun 26
2
A libc in LLVM
I foresee problems with this on both Windows and non-Windows. A
typical libc implementation has a lot of internal state that is shared
across API boundaries in a way that is considered an implementation
detail. So making assumptions about which state is shared and which
isn't is going to be a problem.
How do you guarantee that if you implement method A and forward method
B, that B will