Dmitri Gribenko | fdd4f30 | 2014-02-12 10:40:07 +0000 | [diff] [blame] | 1 | /*==-- clang-c/BuildSysetm.h - Utilities for use by build systems -*- C -*-===*\ |
| 2 | |* *| |
| 3 | |* The LLVM Compiler Infrastructure *| |
| 4 | |* *| |
| 5 | |* This file is distributed under the University of Illinois Open Source *| |
| 6 | |* License. See LICENSE.TXT for details. *| |
| 7 | |* *| |
| 8 | |*===----------------------------------------------------------------------===*| |
| 9 | |* *| |
| 10 | |* This header provides various utilities for use by build systems. *| |
| 11 | |* *| |
| 12 | \*===----------------------------------------------------------------------===*/ |
| 13 | |
Argyrios Kyrtzidis | 09a439d | 2014-02-25 03:59:16 +0000 | [diff] [blame] | 14 | #ifndef CLANG_C_BUILD_SYSTEM_H |
| 15 | #define CLANG_C_BUILD_SYSTEM_H |
Dmitri Gribenko | fdd4f30 | 2014-02-12 10:40:07 +0000 | [diff] [blame] | 16 | |
| 17 | #include "clang-c/Platform.h" |
Argyrios Kyrtzidis | 0b9682e | 2014-02-25 03:59:23 +0000 | [diff] [blame^] | 18 | #include "clang-c/CXErrorCode.h" |
Dmitri Gribenko | fdd4f30 | 2014-02-12 10:40:07 +0000 | [diff] [blame] | 19 | #include "clang-c/CXString.h" |
| 20 | |
| 21 | #ifdef __cplusplus |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | /** |
| 26 | * \defgroup BUILD_SYSTEM Build system utilities |
| 27 | * @{ |
| 28 | */ |
| 29 | |
| 30 | /** |
| 31 | * \brief Return the timestamp for use with Clang's |
| 32 | * \c -fbuild-session-timestamp= option. |
| 33 | */ |
| 34 | CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void); |
| 35 | |
| 36 | /** |
Argyrios Kyrtzidis | 0b9682e | 2014-02-25 03:59:23 +0000 | [diff] [blame^] | 37 | * \brief Object encapsulating information about overlaying virtual |
| 38 | * file/directories over the real file system. |
| 39 | */ |
| 40 | typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay; |
| 41 | |
| 42 | /** |
| 43 | * \brief Create a \c CXVirtualFileOverlay object. |
| 44 | * Must be disposed with \c clang_VirtualFileOverlay_dispose(). |
| 45 | * |
| 46 | * \param options is reserved, always pass 0. |
| 47 | */ |
| 48 | CINDEX_LINKAGE CXVirtualFileOverlay |
| 49 | clang_VirtualFileOverlay_create(unsigned options); |
| 50 | |
| 51 | /** |
| 52 | * \brief Map an absolute virtual file path to an absolute real one. |
| 53 | * The virtual path must be canonicalized (not contain "."/".."). |
| 54 | * \returns 0 for success, non-zero to indicate an error. |
| 55 | */ |
| 56 | CINDEX_LINKAGE enum CXErrorCode |
| 57 | clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay, |
| 58 | const char *virtualPath, |
| 59 | const char *realPath); |
| 60 | |
| 61 | /** |
| 62 | * \brief Write out the \c CXVirtualFileOverlay object to a char buffer. |
| 63 | * |
| 64 | * \param options is reserved, always pass 0. |
| 65 | * \param out_buffer pointer to receive the CXString object, which should be |
| 66 | * disposed using \c clang_disposeString(). |
| 67 | * \returns 0 for success, non-zero to indicate an error. |
| 68 | */ |
| 69 | CINDEX_LINKAGE enum CXErrorCode |
| 70 | clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options, |
| 71 | CXString *out_buffer); |
| 72 | |
| 73 | /** |
| 74 | * \brief Dispose a \c CXVirtualFileOverlay object. |
| 75 | */ |
| 76 | CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay); |
| 77 | |
| 78 | /** |
Dmitri Gribenko | fdd4f30 | 2014-02-12 10:40:07 +0000 | [diff] [blame] | 79 | * @} |
| 80 | */ |
| 81 | |
| 82 | #ifdef __cplusplus |
| 83 | } |
| 84 | #endif |
| 85 | |
Argyrios Kyrtzidis | 09a439d | 2014-02-25 03:59:16 +0000 | [diff] [blame] | 86 | #endif /* CLANG_C_BUILD_SYSTEM_H */ |
Dmitri Gribenko | fdd4f30 | 2014-02-12 10:40:07 +0000 | [diff] [blame] | 87 | |