diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-11-20 15:27:43 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-11-20 15:27:43 +0000 |
commit | 6438972553fa8f5c9d584d21028639c5cd665f8c (patch) | |
tree | eca3d7889246c59ec975151d7690dd10c2b1ac53 /clang/lib/CodeGen | |
parent | 37351059618bf1a911d9d555273bcf7be0f570b7 (diff) | |
download | bcm5719-llvm-6438972553fa8f5c9d584d21028639c5cd665f8c.tar.gz bcm5719-llvm-6438972553fa8f5c9d584d21028639c5cd665f8c.zip |
Revert 347294, it turned many bots on lab.llvm.org:8011/console red.
llvm-svn: 347314
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 4e639e98290..5291dc9a488 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -1926,26 +1926,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_rotateright64: return emitRotate(E, true); - case Builtin::BI__builtin_constant_p: { - llvm::Type *ResultType = ConvertType(E->getType()); - if (CGM.getCodeGenOpts().OptimizationLevel == 0) - // At -O0, we don't perform inlining, so we don't need to delay the - // processing. - return RValue::get(ConstantInt::get(ResultType, 0)); - if (auto *DRE = dyn_cast<DeclRefExpr>(E->getArg(0)->IgnoreImplicit())) { - auto DREType = DRE->getType(); - if (DREType->isAggregateType() || DREType->isFunctionType()) - return RValue::get(ConstantInt::get(ResultType, 0)); - } - Value *ArgValue = EmitScalarExpr(E->getArg(0)); - llvm::Type *ArgType = ArgValue->getType(); - - Value *F = CGM.getIntrinsic(Intrinsic::is_constant, ArgType); - Value *Result = Builder.CreateCall(F, ArgValue); - if (Result->getType() != ResultType) - Result = Builder.CreateIntCast(Result, ResultType, /*isSigned*/true); - return RValue::get(Result); - } case Builtin::BI__builtin_object_size: { unsigned Type = E->getArg(1)->EvaluateKnownConstInt(getContext()).getZExtValue(); |