diff options
author | Renato Golin <renato.golin@linaro.org> | 2014-01-21 10:24:35 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2014-01-21 10:24:35 +0000 |
commit | e195f9ce153ac59601213d939462e6fe2ab6c033 (patch) | |
tree | cb55f57cee3149e6cb64e9fe4480564170f3ba54 /llvm/lib/CodeGen/StackProtector.cpp | |
parent | 4871067a556d6408560f6bd0394cb47a32e36f5c (diff) | |
download | bcm5719-llvm-e195f9ce153ac59601213d939462e6fe2ab6c033.tar.gz bcm5719-llvm-e195f9ce153ac59601213d939462e6fe2ab6c033.zip |
Checked return warning from coverity
llvm-svn: 199716
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackProtector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index f2925ef7712..349b733418e 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -91,8 +91,9 @@ bool StackProtector::runOnFunction(Function &Fn) { Attribute Attr = Fn.getAttributes().getAttribute( AttributeSet::FunctionIndex, "stack-protector-buffer-size"); - if (Attr.isStringAttribute()) - Attr.getValueAsString().getAsInteger(10, SSPBufferSize); + if (Attr.isStringAttribute() && + Attr.getValueAsString().getAsInteger(10, SSPBufferSize)) + return false; // Invalid integer string ++NumFunProtected; return InsertStackProtectors(); |