Skip to content

Commit 244f7fb

Browse files
authored
[NFC] Remove redundant call to getMainExecutable() (#3018)
The call to getMainExecutable() function can be eliminated because the path returned by that call is used only for error reporting, so the tool can use argv[0] for this purpose as is without any additional processing. Signed-off-by: Sergey Dmitriev <[email protected]>
1 parent be04892 commit 244f7fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/tools/clang-offload-deps/ClangOffloadDeps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static void reportError(Error E) {
7373

7474
int main(int argc, const char **argv) {
7575
sys::PrintStackTraceOnErrorSignal(argv[0]);
76-
ToolPath = sys::fs::getMainExecutable(argv[0], &ToolPath);
76+
ToolPath = argv[0];
7777

7878
cl::HideUnrelatedOptions(ClangOffloadDepsCategory);
7979
cl::SetVersionPrinter([](raw_ostream &OS) {

0 commit comments

Comments
 (0)