[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
This commit is contained in:
Kostya Serebryany
2013-02-11 08:13:54 +00:00
parent f64c889cc9
commit ab39afa9d9
12 changed files with 42 additions and 3 deletions
+5 -1
View File
@@ -922,6 +922,8 @@ bool LLParser::ParseFnAttributeValuePairs(AttrBuilder &B,
case lltok::kw_ssp: B.addAttribute(Attribute::StackProtect); break;
case lltok::kw_sspreq: B.addAttribute(Attribute::StackProtectReq); break;
case lltok::kw_sspstrong: B.addAttribute(Attribute::StackProtectStrong); break;
case lltok::kw_thread_safety: B.addAttribute(Attribute::ThreadSafety); break;
case lltok::kw_uninitialized_checks: B.addAttribute(Attribute::UninitializedChecks); break;
case lltok::kw_uwtable: B.addAttribute(Attribute::UWTable); break;
// Error handling.
@@ -1161,7 +1163,8 @@ bool LLParser::ParseOptionalParamAttrs(AttrBuilder &B) {
case lltok::kw_noredzone: case lltok::kw_noimplicitfloat:
case lltok::kw_naked: case lltok::kw_nonlazybind:
case lltok::kw_address_safety: case lltok::kw_minsize:
case lltok::kw_alignstack:
case lltok::kw_alignstack: case lltok::kw_thread_safety:
case lltok::kw_uninitialized_checks:
HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute");
break;
}
@@ -1203,6 +1206,7 @@ bool LLParser::ParseOptionalReturnAttrs(AttrBuilder &B) {
case lltok::kw_nonlazybind: case lltok::kw_address_safety:
case lltok::kw_minsize: case lltok::kw_alignstack:
case lltok::kw_align: case lltok::kw_noduplicate:
case lltok::kw_thread_safety: case lltok::kw_uninitialized_checks:
HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute");
break;
}