[PATCH] D19410: [scan-build] fix warnings emitted on LLVM ARM code base
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 03:32:04 PDT 2016
rengolin added a comment.
Please, change the two conditions and remove the two asserts I commented on.
cheers,
--renato
================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:9965
@@ +9964,3 @@
+ const MCSection *Section = getStreamer().getCurrentSection().first;
+ assert(Section && "must have section to emit alignment");
+ if (Section->UseCodeAlign())
----------------
I agree, this assert is correct.
================
Comment at: lib/Target/ARM/Thumb2SizeReduction.cpp:992
@@ -991,2 +991,3 @@
if (!NextInSameBundle && MI->isInsideBundle()) {
+ assert(BundleMI && "MachineInstr is null, abort reducing width of instructions");
// FIXME: Since post-ra scheduler operates on bundles, the CPSR kill
----------------
turns out I was wrong. This cannot be an assert, as it doesn't have to break when BuidleMI is not defined.
Please change the condition to:
if (BundleMI && !NextInSameBundle && MI->isInsideBundle()) {
http://reviews.llvm.org/D19410
More information about the llvm-commits
mailing list