diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2020-12-29 18:52:53 +0100 |
|---|---|---|
| committer | Timon Kruiper <timonkruiper@gmail.com> | 2021-01-03 17:23:30 +0100 |
| commit | 0ed04aac8bc0cfaa0b2489f7392a6df4e3915b0f (patch) | |
| tree | 8fe360becae88e873172c510d0e87f6dbc697f42 /src | |
| parent | 5aac2fc28111e59a2a05a4fae42b6e19d4e0b7ca (diff) | |
| download | zig-0ed04aac8bc0cfaa0b2489f7392a6df4e3915b0f.tar.gz zig-0ed04aac8bc0cfaa0b2489f7392a6df4e3915b0f.zip | |
stage2: fix building self-hosted compiler with -Dstatic-llvm
This supersedes c81ae52ee0b2e952f8ed9c5c6517af8182bb09c1
Diffstat (limited to 'src')
| -rw-r--r-- | src/zig_clang.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/zig_clang.h b/src/zig_clang.h index 32879062ae..169fbcedfb 100644 --- a/src/zig_clang.h +++ b/src/zig_clang.h @@ -8,14 +8,32 @@ #ifndef ZIG_ZIG_CLANG_H #define ZIG_ZIG_CLANG_H -#include "stage1/stage2.h" #include <inttypes.h> #include <stdbool.h> +#include <stddef.h> + +#ifdef __cplusplus +#define ZIG_EXTERN_C extern "C" +#else +#define ZIG_EXTERN_C +#endif // ATTENTION: If you modify this file, be sure to update the corresponding // extern function declarations in the self-hosted compiler file // src/clang.zig. +// ABI warning +struct Stage2ErrorMsg { + const char *filename_ptr; // can be null + size_t filename_len; + const char *msg_ptr; + size_t msg_len; + const char *source; // valid until the ASTUnit is freed. can be null + unsigned line; // 0 based + unsigned column; // 0 based + unsigned offset; // byte offset into source +}; + struct ZigClangSourceLocation { unsigned ID; }; |
