diff options
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index a015716..0138edb 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1011,8 +1011,6 @@ public: } llvm::Constant *VisitConstantExpr(ConstantExpr *CE, QualType T) { - if (llvm::Constant *Result = Emitter.tryEmitConstantExpr(CE)) - return Result; return Visit(CE->getSubExpr(), T); } @@ -1360,20 +1358,6 @@ ConstantEmitter::tryEmitAbstract(const APValue &value, QualType destType) { return validateAndPopAbstract(C, state); } -llvm::Constant *ConstantEmitter::tryEmitConstantExpr(const ConstantExpr *CE) { - if (!CE->hasAPValueResult()) - return nullptr; - const Expr *Inner = CE->getSubExpr()->IgnoreImplicit(); - QualType RetType; - if (auto *Call = dyn_cast<CallExpr>(Inner)) - RetType = Call->getCallReturnType(CGF->getContext()); - else if (auto *Ctor = dyn_cast<CXXConstructExpr>(Inner)) - RetType = Ctor->getType(); - llvm::Constant *Res = - emitAbstract(CE->getBeginLoc(), CE->getAPValueResult(), RetType); - return Res; -} - llvm::Constant * ConstantEmitter::emitAbstract(const Expr *E, QualType destType) { auto state = pushAbstract(); @@ -1919,8 +1903,6 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { ConstantLValue ConstantLValueEmitter::VisitConstantExpr(const ConstantExpr *E) { - if (llvm::Constant *Result = Emitter.tryEmitConstantExpr(E)) - return Result; return Visit(E->getSubExpr()); } |