[HIPIFY] Scripting related refactoring

+ Move generating hipify-perl and hipify-python into separate namespaces and files
+ Move getAbsoluteFilePath and getAbsoluteDirectoryPath to StringUtils
This commit is contained in:
Evgeny Mankov committed 2019-09-15 21:13:56 +03:00
1 parent 32c6bae2f4
commit db2fee682b
6 files changed
+352 -222

No files matched your search

+12
View File
@@ -34,3 +34,15 @@ llvm::StringRef unquoteStr(llvm::StringRef s);
* If `s` starts with `prefix`, remove it. Otherwise, does nothing.
*/
void removePrefixIfPresent(std::string &s, const std::string& prefix);
/**
* Returns Absolute File Path based on filename, otherwise - error.
*/
std::string getAbsoluteFilePath(const std::string& sFile, std::error_code& EC);
/**
* Returns Absolute Directory Path based on directory name, otherwise - error;
* by default the directory is temporary and created.
*/
std::string getAbsoluteDirectoryPath(const std::string& sDir, std::error_code& EC,
const std::string& sDirType = "temporary", bool bCreateDir = true);