forked from OSchip/llvm-project
XCOFFObjectWriter - silence static analyzer dyn_cast<> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us. llvm-svn: 374788
This commit is contained in:
parent
0e100037d7
commit
ef0cb27180
|
@ -218,7 +218,7 @@ void XCOFFObjectWriter::executePostLayoutBinding(
|
|||
DenseMap<const MCSectionXCOFF *, ControlSection *> WrapperMap;
|
||||
|
||||
for (const auto &S : Asm) {
|
||||
const MCSectionXCOFF *MCSec = dyn_cast<const MCSectionXCOFF>(&S);
|
||||
const auto *MCSec = cast<const MCSectionXCOFF>(&S);
|
||||
assert(WrapperMap.find(MCSec) == WrapperMap.end() &&
|
||||
"Cannot add a csect twice.");
|
||||
|
||||
|
|
Loading…
Reference in New Issue