CIRCT  19.0.0git
Path.h
Go to the documentation of this file.
1 //===- Path.h - Path Utilities ----------------------------------*- C++ -*-===//
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 // Utilities for file system path handling, supplementing the ones from
10 // llvm::sys::path.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef CIRCT_SUPPORT_PATH_H
15 #define CIRCT_SUPPORT_PATH_H
16 
17 #include "circt/Support/LLVM.h"
18 
19 namespace circt {
20 
21 /// Append a path to an existing path, replacing it if the other path is
22 /// absolute. This mimicks the behaviour of `foo/bar` and `/foo/bar` being used
23 /// in a working directory `/home`, resulting in `/home/foo/bar` and `/foo/bar`,
24 /// respectively.
25 void appendPossiblyAbsolutePath(llvm::SmallVectorImpl<char> &base,
26  const llvm::Twine &suffix);
27 
28 } // namespace circt
29 
30 #endif // CIRCT_SUPPORT_PATH_H
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
void appendPossiblyAbsolutePath(llvm::SmallVectorImpl< char > &base, const llvm::Twine &suffix)
Append a path to an existing path, replacing it if the other path is absolute.
Definition: Path.cpp:23