interface: handle FileManager::getFile returning ErrorOr<const FileEntry *>
LLVM commit
461f0722dd2 changed the return value of
FileManager::getFile to llvm::ErrorOr<const FileEntry *>.
Extract out the embedded const FileEntry * in this case,
while not modifying the return value if it is already
of type const FileEntry * (for older versions of LLVM/clang).
The code uses templates to pick the right version
because llvm::ErrorOr may not even be defined
(in really old versions of LLVM/clang).
Reported-by: Rainer Orth <ro@gcc.gnu.org>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>