зеркало из https://github.com/microsoft/clang-1.git
Revert r147655; it's breaking the compiler_rt build on OSX.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
b4fa418a72
Коммит
52a27f5be9
|
@ -175,8 +175,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
unsigned BuiltinID, const CallExpr *E) {
|
||||
// See if we can constant fold this builtin. If so, don't emit it at all.
|
||||
Expr::EvalResult Result;
|
||||
if (!getContext().getLangOptions().NoBuiltin &&
|
||||
E->EvaluateAsRValue(Result, CGM.getContext()) &&
|
||||
if (E->EvaluateAsRValue(Result, CGM.getContext()) &&
|
||||
!Result.hasSideEffects()) {
|
||||
if (Result.Val.isInt())
|
||||
return RValue::get(llvm::ConstantInt::get(getLLVMContext(),
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
// RUN: %clang_cc1 -fno-builtin -emit-llvm %s -o - | FileCheck %s
|
||||
//
|
||||
// Check that -fno-builtin prevents us from constant-folding through builtins
|
||||
// (PR11711)
|
||||
|
||||
double
|
||||
cos(double x)
|
||||
{
|
||||
printf("ok\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
cos(1); // CHECK: cos
|
||||
printf("not ok\n");
|
||||
abort();
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче