Fix generator not finding libclang

PiperOrigin-RevId: 281745276
Change-Id: I8c55b142a72265f577d6d1e3b673890529428c21
This commit is contained in:
Christian Blichmann 2019-11-21 07:32:42 -08:00 committed by Copybara-Service
parent 948b75efe9
commit d9d45bcfe5

View File

@ -636,6 +636,7 @@ class Analyzer(object):
if test_file_existence and not os.path.isfile(path):
raise IOError('Path {} does not exist.'.format(path))
_init_libclang()
index = cindex.Index.create() # type: cindex.Index
# TODO(szwl): hack until I figure out how python swig does that.
# Headers will be parsed as C++. C libs usually have