Skip to content

Commit bc9a1b3

Browse files
committed
ObjectFile makeTriple - silence static analyzer dyn_cast<COFFObjectFile> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<COFFObjectFile> directly and if not assert will fire for us. llvm-svn: 373324
1 parent 9f2bf66 commit bc9a1b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Object/ObjectFile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Triple ObjectFile::makeTriple() const {
105105
TheTriple.setObjectFormat(Triple::MachO);
106106

107107
if (isCOFF()) {
108-
const auto COFFObj = dyn_cast<COFFObjectFile>(this);
108+
const auto COFFObj = cast<COFFObjectFile>(this);
109109
if (COFFObj->getArch() == Triple::thumb)
110110
TheTriple.setTriple("thumbv7-windows");
111111
}

0 commit comments

Comments
 (0)