diff options
| author | Dmitri Gribenko <gribozavr@gmail.com> | 2014-02-12 19:12:37 +0000 |
|---|---|---|
| committer | Dmitri Gribenko <gribozavr@gmail.com> | 2014-02-12 19:12:37 +0000 |
| commit | b670b9b849e8528e77dc65f67652c8513708f4f0 (patch) | |
| tree | 81059382c0faa4568f622e3477471aea5b38283a /lib/CodeGen/CGExprComplex.cpp | |
| parent | e4022bf2ed043db77289bdaf7285c98076e3aa12 (diff) | |
| download | clang-b670b9b849e8528e77dc65f67652c8513708f4f0.tar.gz clang-b670b9b849e8528e77dc65f67652c8513708f4f0.tar.bz2 clang-b670b9b849e8528e77dc65f67652c8513708f4f0.tar.xz | |
libclang: report error code for bad PCH files
This commit improves libclang to report the error condition when
CXTranslationUnit can not be created because of a stale PCH file. This allows
the caller, for example, to rebuild the PCH file and retry the request.
There two are APIs in libclang that return a CXTranslationUnit and don't
support reporting detailed errors (the only error condition is a NULL result).
For these APIs, a second, superior, version is introduced --
clang_createTranslationUnit2 and clang_parseTranslationUnit2. These functions
return a CXTranslationUnit indirectly and also return an error code. Old
functions are still supported and are nothing more than convenience wrappers
that ignore extended error codes.
As a cleanup, this commit also categorizes some libclang errors in the
functions I had to modify anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
0 files changed, 0 insertions, 0 deletions
