diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-05-04 00:14:37 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-05-04 00:14:37 +0000 |
| commit | 37aa4938c8b59db704d4b9c9fed7d6e5e6583bbe (patch) | |
| tree | 049bbfe1caf644c67612a71316c981c09a96d85b /clang/include/clang-c | |
| parent | 24f3490467371e2ec713becf49ac9fc586a6a718 (diff) | |
| download | bcm5719-llvm-37aa4938c8b59db704d4b9c9fed7d6e5e6583bbe.tar.gz bcm5719-llvm-37aa4938c8b59db704d4b9c9fed7d6e5e6583bbe.zip | |
Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),
which determines whether a particular file is actually a header that
is intended to be guarded from multiple inclusions within the same
translation unit.
llvm-svn: 130808
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index d89a903e411..2f2876e0fae 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -222,6 +222,14 @@ CINDEX_LINKAGE CXString clang_getFileName(CXFile SFile); CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile); /** + * \brief Determine whether the given header is guarded against + * multiple inclusions, either with the conventional + * #ifndef/#define/#endif macro guards or with #pragma once. + */ +CINDEX_LINKAGE unsigned +clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file); + +/** * \brief Retrieve a file handle within the given translation unit. * * \param tu the translation unit |

