Skip to content

Commit 72f52d8

Browse files
committed
Remove extra code
1 parent ed0166e commit 72f52d8

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,20 +1060,17 @@ int main(int argc, char **argv) {
10601060
<< " -" << IROutputOnly.ArgStr << "\n";
10611061
return 1;
10621062
}
1063+
1064+
if (OutputFilename.getNumOccurrences() == 0)
1065+
OutputFilename = (Twine(sys::path::stem(InputFilename)) + ".files").str();
1066+
10631067
SMDiagnostic Err;
10641068
std::unique_ptr<Module> M = parseIRFile(InputFilename, Err, Context);
1065-
// It is OK to use raw pointer here as we control that it does not outlive M
1066-
// or objects it is moved to
1067-
Module *MPtr = M.get();
1068-
1069-
if (!MPtr) {
1069+
if (!M) {
10701070
Err.print(argv[0], errs());
10711071
return 1;
10721072
}
10731073

1074-
if (OutputFilename.getNumOccurrences() == 0)
1075-
OutputFilename = (Twine(sys::path::stem(InputFilename)) + ".files").str();
1076-
10771074
TableFiles TblFiles = processInputModule(std::move(M));
10781075

10791076
// Input module was processed and a single output file was requested.

0 commit comments

Comments
 (0)