1 //===- CXFile.h - Routines for manipulating CXFile --------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_TOOLS_LIBCLANG_CXFILE_H
10 #define LLVM_CLANG_TOOLS_LIBCLANG_CXFILE_H
12 #include "clang-c/CXFile.h"
13 #include "clang/Basic/FileEntry.h"
17 inline CXFile
makeCXFile(OptionalFileEntryRef FE
) {
18 return CXFile(FE
? const_cast<FileEntryRef::MapEntry
*>(&FE
->getMapEntry())
22 inline OptionalFileEntryRef
getFileEntryRef(CXFile File
) {
25 return FileEntryRef(*reinterpret_cast<const FileEntryRef::MapEntry
*>(File
));