[PATCH] D142047: [opt] Fix static code analysis concerns
Arvind Sudarsanam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 07:30:05 PST 2023
asudarsa updated this revision to Diff 490508.
asudarsa added a comment.
Hi @aeubanks
Thanks a lot for your review. I have updated the review based on your comment. Hope this works.
@asudarsa
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142047/new/
https://reviews.llvm.org/D142047
Files:
llvm/tools/opt/NewPMDriver.cpp
Index: llvm/tools/opt/NewPMDriver.cpp
===================================================================
--- llvm/tools/opt/NewPMDriver.cpp
+++ llvm/tools/opt/NewPMDriver.cpp
@@ -366,8 +366,10 @@
P = PGOOptions("", CSProfileGenFile, ProfileRemappingFile,
PGOOptions::NoAction, PGOOptions::CSIRInstr);
} else /* CSPGOKindFlag == CSInstrUse */ {
- if (!P)
+ if (!P) {
errs() << "CSInstrUse needs to be together with InstrUse";
+ return false;
+ }
P->CSAction = PGOOptions::CSIRUse;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142047.490508.patch
Type: text/x-patch
Size: 569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230119/b5f14ec6/attachment.bin>
More information about the llvm-commits
mailing list