Go to the documentation of this file.
11 #include "gtest/gtest.h"
25 return std::make_pair(
true,
std::move(PathInSameDir));
31 return std::make_pair(
true,
std::move(PathInParentDir));
33 return std::pair<bool, SmallString<128>>(
false, {});
41 EXPECT_TRUE(Found) <<
"Unit test source directory file does not exist.";
45 EXPECT_TRUE(
static_cast<bool>(File))
46 <<
"Could not open unit test source directory file.";
48 InputFilePath.
clear();
49 InputFilePath.
append((*File)->getBuffer().trim());
This is an optimization pass for GlobalISel generic memory operations.
void native(const Twine &path, SmallVectorImpl< char > &result, Style style=Style::native)
Convert path to the native form.
static std::pair< bool, SmallString< 128 > > findSrcDirMap(StringRef Argv0)
bool is_regular_file(const basic_file_status &status)
Does status represent a regular file?
void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFile(const Twine &Filename, bool IsText=false, bool RequiresNullTerminator=true, bool IsVolatile=false)
Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful,...
void append(StringRef RHS)
Append from a StringRef.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
StringRef parent_path(StringRef path, Style style=Style::native)
Get parent path.
SmallString< 128 > getInputFileDirectory(const char *Argv0)
void make_absolute(const Twine ¤t_directory, SmallVectorImpl< char > &path)
Make path an absolute path.
StringRef - Represent a constant reference to a string, i.e.