diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-18 05:26:55 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-18 05:26:55 +0000 |
commit | 96be4240bbd7087168240e486d194beb98278db7 (patch) | |
tree | 9b77d6d2857d6706de747da67226b693a3628899 | |
parent | ff5abbb4d3948fbac154e38e4412d2b93f969846 (diff) | |
download | llvm-96be4240bbd7087168240e486d194beb98278db7.tar.gz llvm-96be4240bbd7087168240e486d194beb98278db7.tar.bz2 llvm-96be4240bbd7087168240e486d194beb98278db7.tar.xz |
ARM: add an assertion
Add an assertion that a valid section is referenced. The potential NULL pointer
dereference was identified by the clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204114 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 403e147a6a..ccb1c641ef 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -8804,6 +8804,7 @@ bool ARMAsmParser::parseDirectiveEven(SMLoc L) { Section = getStreamer().getCurrentSection().first; } + assert(Section && "must have section to emit alignment"); if (Section->UseCodeAlign()) getStreamer().EmitCodeAlignment(2); else |