diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-01 11:25:17 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-01 11:25:17 +0000 |
commit | bc9a1b37b934626f54f4c960f6a86ea76785ab1a (patch) | |
tree | 1e945793ec7917f579d4e2fd3031f6900b084b17 /llvm/lib/Object/ObjectFile.cpp | |
parent | 9f2bf666bc0ec59be6684ef8b50cab22a4fad50e (diff) | |
download | bcm5719-llvm-bc9a1b37b934626f54f4c960f6a86ea76785ab1a.tar.gz bcm5719-llvm-bc9a1b37b934626f54f4c960f6a86ea76785ab1a.zip |
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
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp index bcc44cd6ce3..75e0952deb6 100644 --- a/llvm/lib/Object/ObjectFile.cpp +++ b/llvm/lib/Object/ObjectFile.cpp @@ -105,7 +105,7 @@ Triple ObjectFile::makeTriple() const { TheTriple.setObjectFormat(Triple::MachO); if (isCOFF()) { - const auto COFFObj = dyn_cast<COFFObjectFile>(this); + const auto COFFObj = cast<COFFObjectFile>(this); if (COFFObj->getArch() == Triple::thumb) TheTriple.setTriple("thumbv7-windows"); } |