summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2014-01-21 10:24:35 +0000
committerRenato Golin <renato.golin@linaro.org>2014-01-21 10:24:35 +0000
commite195f9ce153ac59601213d939462e6fe2ab6c033 (patch)
treecb55f57cee3149e6cb64e9fe4480564170f3ba54 /llvm/lib/CodeGen/StackProtector.cpp
parent4871067a556d6408560f6bd0394cb47a32e36f5c (diff)
downloadbcm5719-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.cpp5
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();
OpenPOWER on IntegriCloud