libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)
into a getter cxtu::getASTUnit(TU)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173585 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index b286650..4a51e32 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -783,7 +783,7 @@
   llvm::CrashRecoveryContextCleanupRegistrar<IndexingConsumer>
     IndexConsumerCleanup(IndexConsumer.get());
 
-  ASTUnit *Unit = static_cast<ASTUnit *>(TU->TUData);
+  ASTUnit *Unit = cxtu::getASTUnit(TU);
   if (!Unit)
     return;