mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-28 15:33:14 +00:00
[scan-build] fix warnings emitted on LLVM ARM code base
Fix "Logic error" warnings of the type "Called C++ object pointer is null" reported by Clang Static Analyzer. Patch by Apelete Seketeli. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b58361c4a0
commit
5c224e802b
@ -9961,7 +9961,9 @@ bool ARMAsmParser::parseDirectiveAlign(SMLoc L) {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// '.align' is target specifically handled to mean 2**2 byte alignment.
|
// '.align' is target specifically handled to mean 2**2 byte alignment.
|
||||||
if (getStreamer().getCurrentSection().first->UseCodeAlign())
|
const MCSection *Section = getStreamer().getCurrentSection().first;
|
||||||
|
assert(Section && "must have section to emit alignment");
|
||||||
|
if (Section->UseCodeAlign())
|
||||||
getStreamer().EmitCodeAlignment(4, 0);
|
getStreamer().EmitCodeAlignment(4, 0);
|
||||||
else
|
else
|
||||||
getStreamer().EmitValueToAlignment(4, 0, 1, 0);
|
getStreamer().EmitValueToAlignment(4, 0, 1, 0);
|
||||||
|
@ -988,7 +988,7 @@ bool Thumb2SizeReduce::ReduceMBB(MachineBasicBlock &MBB) {
|
|||||||
NextMII->bundleWithPred();
|
NextMII->bundleWithPred();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NextInSameBundle && MI->isInsideBundle()) {
|
if (BundleMI && !NextInSameBundle && MI->isInsideBundle()) {
|
||||||
// FIXME: Since post-ra scheduler operates on bundles, the CPSR kill
|
// FIXME: Since post-ra scheduler operates on bundles, the CPSR kill
|
||||||
// marker is only on the BUNDLE instruction. Process the BUNDLE
|
// marker is only on the BUNDLE instruction. Process the BUNDLE
|
||||||
// instruction as we finish with the bundled instruction to work around
|
// instruction as we finish with the bundled instruction to work around
|
||||||
|
Loading…
Reference in New Issue
Block a user