forked from OSchip/llvm-project
[libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.
llvm-svn: 179121
This commit is contained in:
parent
e8d8288d7e
commit
2bee666540
|
@ -39,6 +39,8 @@ namespace cxtu {
|
|||
CXTranslationUnitImpl *MakeCXTranslationUnit(CIndexer *CIdx, ASTUnit *AU);
|
||||
|
||||
static inline ASTUnit *getASTUnit(CXTranslationUnit TU) {
|
||||
if (!TU)
|
||||
return 0;
|
||||
return TU->TheASTUnit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue