Unconditionally append .hip as the default output filename

[ROCm/clr commit: dbbd6d576d]
Этот коммит содержится в:
Chris Kitching
2017-10-18 19:19:18 +01:00
родитель 756aca43f9
Коммит bbc7a86d2c
+6 -12
Просмотреть файл
@@ -4225,20 +4225,14 @@ int main(int argc, const char **argv) {
}
for (const auto & src : fileSources) {
if (dst.empty()) {
dst = src;
if (!Inplace) {
size_t pos = dst.rfind(".");
if (pos != std::string::npos && pos + 1 < dst.size()) {
dst = dst.substr(0, pos) + ".hip." + dst.substr(pos + 1, dst.size() - pos - 1);
} else {
dst += ".hip.cu";
}
}
} else {
if (Inplace) {
llvm::errs() << "[HIPIFY] conflict: both -o and -inplace options are specified.\n";
return 1;
dst = src;
} else {
dst = src + ".hip";
}
} else if (Inplace) {
llvm::errs() << "[HIPIFY] conflict: both -o and -inplace options are specified.\n";
return 1;
}
std::string tmpFile = src + ".hipify-tmp";