clang-tools 23.0.0git
Utils.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file contains general utility functions and helpers used across the
11/// clang-doc tool, including string manipulation and path handling. It
12/// provides lightweight utilities that do not depend on the core clang-doc
13/// data model.
14///
15//===----------------------------------------------------------------------===//
16#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
17#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
18
19#include "../Representation.h"
20#include "llvm/ADT/SmallString.h"
21#include "llvm/ADT/StringRef.h"
22
23/// Appends \p Path to \p Base and returns the appended path.
24llvm::SmallString<128> appendPathNative(llvm::StringRef Base,
25 llvm::StringRef Path);
26
27/// Appends \p Path to \p Base and returns the appended path in posix style.
28llvm::SmallString<128> appendPathPosix(llvm::StringRef Base,
29 llvm::StringRef Path);
30
31void getHtmlFiles(llvm::StringRef AssetsPath,
33
34void getMdFiles(llvm::StringRef AssetsPath, clang::doc::ClangDocContext &CDCtx);
35
36#endif
llvm::SmallString< 128 > appendPathPosix(llvm::StringRef Base, llvm::StringRef Path)
Appends Path to Base and returns the appended path in posix style.
void getHtmlFiles(llvm::StringRef AssetsPath, clang::doc::ClangDocContext &CDCtx)
llvm::SmallString< 128 > appendPathNative(llvm::StringRef Base, llvm::StringRef Path)
Appends Path to Base and returns the appended path.
void getMdFiles(llvm::StringRef AssetsPath, clang::doc::ClangDocContext &CDCtx)
Definition Utils.cpp:87