summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-03-18 05:26:55 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-03-18 05:26:55 +0000
commit42b233a836ebda7c725426ff0c8d9e68dc9c9933 (patch)
treef1aaa24e68bb873175a7cd599c9beaa3d4ab7524 /llvm/lib
parent35c3f61d749d78917ee572f672c89993692047b9 (diff)
downloadbcm5719-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.cpp1
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
OpenPOWER on IntegriCloud