summaryrefslogtreecommitdiff
path: root/lib/VMCore/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-11-13 01:02:14 +0000
committerBill Wendling <isanbard@gmail.com>2008-11-13 01:02:14 +0000
commite9e6bdf27fca46dc9eca2ebdf73e03747d1859ab (patch)
tree565577ce5e9de5d74dacdf007bb6657832a9aa9f /lib/VMCore/Attributes.cpp
parent7fc610f07311ecbbbdf163e5bcb45c636b87c983 (diff)
downloadllvm-e9e6bdf27fca46dc9eca2ebdf73e03747d1859ab.tar.gz
llvm-e9e6bdf27fca46dc9eca2ebdf73e03747d1859ab.tar.bz2
llvm-e9e6bdf27fca46dc9eca2ebdf73e03747d1859ab.tar.xz
Implement stack protectors as function attributes: "ssp" and "sspreq".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Attributes.cpp')
-rw-r--r--lib/VMCore/Attributes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 433b79d77c..92acc111be 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -53,6 +53,10 @@ std::string Attribute::getAsString(Attributes Attrs) {
Result += "noinline ";
if (Attrs & Attribute::AlwaysInline)
Result += "alwaysinline ";
+ if (Attrs & Attribute::StackProtect)
+ Result += "ssp ";
+ if (Attrs & Attribute::StackProtectReq)
+ Result += "sspreq ";
if (Attrs & Attribute::Alignment) {
Result += "align ";
Result += utostr((Attrs & Attribute::Alignment) >> 16);