Lines Matching refs:Path
1 //===-- Path.cpp - Implement OS Path Concept --------------------*- C++ -*-===//
10 // This header file implements the operating system Path concept.
14 #include "llvm/Support/Path.h"
33 bool Path::operator==(const Path &that) const {
34 return path == that.path;
37 bool Path::operator<(const Path& that) const {
38 return path < that.path;
41 Path
42 Path::GetLLVMConfigDir() {
43 Path result;
164 Path::isArchive() const {
172 Path::isDynamicLibrary() const {
187 Path::isObjectFile() const {
194 Path
195 Path::FindLibrary(std::string& name) {
196 std::vector<sys::Path> LibPaths;
199 sys::Path FullPath(LibPaths[i]);
208 return sys::Path();
211 StringRef Path::GetDLLSuffix() {
216 Path::appendSuffix(StringRef suffix) {
218 path.append(".");
219 path.append(suffix);
224 Path::isBitcodeFile() const {
231 bool Path::hasMagicNumber(StringRef Magic) const {
238 static void getPathList(const char*path, std::vector<Path>& Paths) {
239 const char* at = path;
241 Path tmpPath;
257 static StringRef getDirnameCharSep(StringRef path, const char *Sep) {
260 if (path.empty())
263 // If the path is all slashes, return a single slash.
266 signed pos = static_cast<signed>(path.size()) - 1;
268 while (pos >= 0 && path[pos] == Sep[0])
272 return path[0] == Sep[0] ? Sep : ".";
277 while (i < pos && path[i] != Sep[0])
284 while (pos >= 0 && path[pos] != Sep[0])
288 while (pos >= 0 && path[pos] == Sep[0])
292 return path[0] == Sep[0] ? Sep : ".";
294 return path.substr(0, pos+1);
299 #include "Unix/Path.inc"
302 #include "Windows/Path.inc"