diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-14 01:42:35 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-14 01:42:35 +0000 |
commit | 321b8179afaf803dcc56b2a19f7b0891a03c92c8 (patch) | |
tree | 89c40ce54b91ff6d987a00a6e67990eb88253e37 /lib/Sema/SemaAttr.cpp | |
parent | 9d3f5f7550a2fab4178ed01425758c349b73a609 (diff) |
Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index c983199cf9..794b0b1f1c 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -350,6 +350,20 @@ void Sema::ActOnPragmaVisibility(bool IsPush, const IdentifierInfo* VisType, } } +void Sema::ActOnPragmaFPContract(tok::OnOffSwitch OOS) { + switch (OOS) { + case tok::OOS_ON: + FPFeatures.fp_contract = 1; + break; + case tok::OOS_OFF: + FPFeatures.fp_contract = 0; + break; + case tok::OOS_DEFAULT: + FPFeatures.fp_contract = getLangOptions().DefaultFPContract; + break; + } +} + void Sema::PushNamespaceVisibilityAttr(const VisibilityAttr *Attr) { // Visibility calculations will consider the namespace's visibility. // Here we just want to note that we're in a visibility context |