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 | d688bab563da574394913722eea9fb8a9e062660 (patch) | |
| tree | 0d32257552d82cc26eab960dba3a1af6f5ace4c7 /llvm/lib/AsmParser | |
| parent | 35d2dc765e8e69f6710104f5fd6109a1f49c085e (diff) | |
| download | bcm5719-llvm-d688bab563da574394913722eea9fb8a9e062660.tar.gz bcm5719-llvm-d688bab563da574394913722eea9fb8a9e062660.zip | |
[tsan/msan] adding thread_safety and uninitialized_checks attributes
llvm-svn: 174864
Diffstat (limited to 'llvm/lib/AsmParser')
| -rw-r--r-- | llvm/lib/AsmParser/LLLexer.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/AsmParser/LLToken.h | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 2256124043e..3b8b0337e52 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -578,6 +578,8 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(ssp); KEYWORD(sspreq); KEYWORD(sspstrong); + KEYWORD(thread_safety); + KEYWORD(uninitialized_checks); KEYWORD(uwtable); KEYWORD(zeroext); diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index e2f42d82316..e4f8d1fec41 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -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; } diff --git a/llvm/lib/AsmParser/LLToken.h b/llvm/lib/AsmParser/LLToken.h index 8c18a3be602..97429b8ce5d 100644 --- a/llvm/lib/AsmParser/LLToken.h +++ b/llvm/lib/AsmParser/LLToken.h @@ -119,6 +119,8 @@ namespace lltok { kw_sspreq, kw_sspstrong, kw_sret, + kw_thread_safety, + kw_uninitialized_checks, kw_uwtable, kw_zeroext, |

