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 | 42b233a836ebda7c725426ff0c8d9e68dc9c9933 (patch) | |
| tree | f1aaa24e68bb873175a7cd599c9beaa3d4ab7524 /llvm/lib | |
| parent | 35c3f61d749d78917ee572f672c89993692047b9 (diff) | |
| download | bcm5719-llvm-42b233a836ebda7c725426ff0c8d9e68dc9c9933.tar.gz bcm5719-llvm-42b233a836ebda7c725426ff0c8d9e68dc9c9933.zip | |
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.
llvm-svn: 204114
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 403e147a6ab..ccb1c641efe 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/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 |

