brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 22a75c5 Raw
37 lines · c
1//===-- PathConfig.h - Process paths of symbols -----------------*- C++ -*-===//2//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_PATH_CONFIG_H11#define LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_PATH_CONFIG_H12 13#include "HeaderMapCollector.h"14#include "clang/Basic/SourceManager.h"15#include <string>16 17namespace clang {18namespace find_all_symbols {19 20/// This calculates the include path for \p Loc.21///22/// \param SM SourceManager.23/// \param Loc A SourceLocation.24/// \param Collector An optional header mapping collector.25///26/// \return The file path (or mapped file path if Collector is provided) of the27/// header that includes \p Loc. If \p Loc comes from .inc header file, \p Loc28/// is set to the location from which the .inc header file is included. If \p29/// Loc is invalid or comes from a main file, this returns an empty string.30std::string getIncludePath(const SourceManager &SM, SourceLocation Loc,31                           const HeaderMapCollector *Collector = nullptr);32 33} // namespace find_all_symbols34} // namespace clang35 36#endif // LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_PATH_CONFIG_H37