10#ifndef CPPINTEROP_UTILS_PATHS_H
11#define CPPINTEROP_UTILS_PATHS_H
13#include "llvm/ADT/SmallVector.h"
14#include "llvm/ADT/StringRef.h"
23class HeaderSearchOptions;
50void*
DLOpen(
const std::string& Path, std::string* Err =
nullptr);
59void DLClose(
void* Lib, std::string* Err =
nullptr);
81 llvm::SmallVectorImpl<llvm::StringRef>& Paths,
84 bool Verbose =
false);
96 llvm::StringRef PathStr, clang::HeaderSearchOptions& HOpts,
117 llvm::SmallVectorImpl<std::string>& Paths,
118 bool WithSystem,
bool WithFlags);
@ kAllowNonExistent
Add all paths whether they exist or not.
@ kPruneNonExistent
Don't add non-existent paths into output.
@ kFailNonExistent
Fail on any non-existent paths.
void CopyIncludePaths(const clang::HeaderSearchOptions &Opts, llvm::SmallVectorImpl< std::string > &incpaths, bool withSystem, bool withFlags)
Copies the current include paths into the HeaderSearchOptions.
bool SplitPaths(llvm::StringRef PathStr, llvm::SmallVectorImpl< llvm::StringRef > &Paths, SplitMode Mode, llvm::StringRef Delim, bool Verbose)
Collect the constituent paths from a PATH string.
void AddIncludePaths(llvm::StringRef PathStr, clang::HeaderSearchOptions &HOpts, const char *Delim)
Adds multiple include paths separated by a delimiter into the given HeaderSearchOptions.
void LogNonExistentDirectory(llvm::StringRef Path)
Write to cling::errs that directory does not exist in a format matching what 'clang -v' would do.