1. fixed file extension search bug

2. added new dependency
This commit is contained in:
dfukalov
2016-03-03 18:28:24 +03:00
parent b90ee96510
commit 5db0984077
2 ha cambiato i file con 6 aggiunte e 8 eliminazioni
+5 -8
Vedi File
@@ -611,7 +611,7 @@ int main(int argc, const char **argv) {
std::vector<std::string> fileSources = OptionsParser.getSourcePathList();
if (dst.empty()) {
dst = fileSources[0];
size_t pos = dst.find(".cu");
size_t pos = dst.rfind(".cu");
if (pos != std::string::npos) {
dst = dst.substr(0, pos) + ".hip.cu";
} else {
@@ -656,7 +656,7 @@ int main(int argc, const char **argv) {
Tool.appendArgumentsAdjuster(getClangSyntaxOnlyAdjuster());
Result = Tool.run(action.get());
Tool.clearArgumentsAdjusters();
Tool.clearArgumentsAdjusters();
}
LangOptions DefaultLangOptions;
@@ -680,13 +680,10 @@ int main(int argc, const char **argv) {
Result = Rewrite.overwriteChangedFiles();
size_t pos = dst.rfind(".cu");
if (pos != std::string::npos)
{
size_t pos = dst.find(".cu");
if (pos != std::string::npos)
{
rename(dst.c_str(), dst.substr(0, pos).c_str());
}
rename(dst.c_str(), dst.substr(0, pos).c_str());
}
return Result;
}