diff options
author | Kostya Serebryany <kcc@google.com> | 2013-02-11 08:13:54 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-02-11 08:13:54 +0000 |
commit | ab39afa9d9b99c61842c8e3d0eb706bd16efdcf3 (patch) | |
tree | 35b53df2aaa398d54deefbc9ff458c3ca93ebb10 /lib/IR | |
parent | f64c889cc94417322b0ff8ad1c61939183bf3c38 (diff) | |
download | external_llvm-ab39afa9d9b99c61842c8e3d0eb706bd16efdcf3.zip external_llvm-ab39afa9d9b99c61842c8e3d0eb706bd16efdcf3.tar.gz external_llvm-ab39afa9d9b99c61842c8e3d0eb706bd16efdcf3.tar.bz2 |
[tsan/msan] adding thread_safety and uninitialized_checks attributes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Attributes.cpp | 6 | ||||
-rw-r--r-- | lib/IR/Verifier.cpp | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index 343f569..267c1aa 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -205,6 +205,10 @@ std::string Attribute::getAsString() const { return "sspstrong"; if (hasAttribute(Attribute::StructRet)) return "sret"; + if (hasAttribute(Attribute::ThreadSafety)) + return "thread_safety"; + if (hasAttribute(Attribute::UninitializedChecks)) + return "uninitialized_checks"; if (hasAttribute(Attribute::UWTable)) return "uwtable"; if (hasAttribute(Attribute::ZExt)) @@ -382,6 +386,8 @@ uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) { case Attribute::MinSize: return 1ULL << 33; case Attribute::NoDuplicate: return 1ULL << 34; case Attribute::StackProtectStrong: return 1ULL << 35; + case Attribute::ThreadSafety: return 1ULL << 36; + case Attribute::UninitializedChecks: return 1ULL << 37; } llvm_unreachable("Unsupported attribute type"); } diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 31312dc..02c2096 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -651,6 +651,8 @@ void Verifier::VerifyParameterAttrs(AttributeSet Attrs, uint64_t Idx, Type *Ty, !Attrs.hasAttribute(Idx, Attribute::NonLazyBind) && !Attrs.hasAttribute(Idx, Attribute::ReturnsTwice) && !Attrs.hasAttribute(Idx, Attribute::AddressSafety) && + !Attrs.hasAttribute(Idx, Attribute::ThreadSafety) && + !Attrs.hasAttribute(Idx, Attribute::UninitializedChecks) && !Attrs.hasAttribute(Idx, Attribute::MinSize), "Some attributes in '" + Attrs.getAsString(Idx) + "' only apply to functions!", V); |