diff options
| author | Lang Hames <lhames@gmail.com> | 2012-10-02 04:45:10 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2012-10-02 04:45:10 +0000 |
| commit | 5de91cc35f62342e5eb70175cb3ff5cc5db811c4 (patch) | |
| tree | 23742c6e4f310ba2bf56702f82a3e8ef0e76fd84 /clang/lib/Rewrite | |
| parent | b67c6cc24de76e0d74f932f3534a76f6f939d8a2 (diff) | |
| download | bcm5719-llvm-5de91cc35f62342e5eb70175cb3ff5cc5db811c4.tar.gz bcm5719-llvm-5de91cc35f62342e5eb70175cb3ff5cc5db811c4.zip | |
Add FP_CONTRACT support for clang.
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).
llvm-svn: 164989
Diffstat (limited to 'clang/lib/Rewrite')
| -rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp | 5 | ||||
| -rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteObjC.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp index b2ba0f0359a..245e809c90d 100644 --- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -3576,7 +3576,8 @@ Stmt *RewriteModernObjC::SynthMessageExpr(ObjCMessageExpr *Exp, SourceLocation()); BinaryOperator *lessThanExpr = new (Context) BinaryOperator(sizeofExpr, limit, BO_LE, Context->IntTy, - VK_RValue, OK_Ordinary, SourceLocation()); + VK_RValue, OK_Ordinary, SourceLocation(), + false); // (sizeof(returnType) <= 8 ? objc_msgSend(...) : objc_msgSend_stret(...)) ConditionalOperator *CondExpr = new (Context) ConditionalOperator(lessThanExpr, @@ -7473,7 +7474,7 @@ Stmt *RewriteModernObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) { BinaryOperator *addExpr = new (Context) BinaryOperator(castExpr, DRE, BO_Add, Context->getPointerType(Context->CharTy), - VK_RValue, OK_Ordinary, SourceLocation()); + VK_RValue, OK_Ordinary, SourceLocation(), false); // Don't forget the parens to enforce the proper binding. ParenExpr *PE = new (Context) ParenExpr(SourceLocation(), SourceLocation(), diff --git a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp index 62def16ab5b..a6dcc6b8d80 100644 --- a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -3078,7 +3078,8 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp, SourceLocation()); BinaryOperator *lessThanExpr = new (Context) BinaryOperator(sizeofExpr, limit, BO_LE, Context->IntTy, - VK_RValue, OK_Ordinary, SourceLocation()); + VK_RValue, OK_Ordinary, SourceLocation(), + false); // (sizeof(returnType) <= 8 ? objc_msgSend(...) : objc_msgSend_stret(...)) ConditionalOperator *CondExpr = new (Context) ConditionalOperator(lessThanExpr, |

