summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2019-05-17 05:46:03 +0000
committerChris Bieneman <chris.bieneman@me.com>2019-05-17 05:46:03 +0000
commita971003e46774281f768c7f59c575827f60f27b4 (patch)
tree3ca250ccea8ff242661c8c36c136b7369e119585 /clang/lib/CodeGen/CGExprConstant.cpp
parenta5a4124c494ce08a9decb96d2be94e7f216bedbd (diff)
downloadbcm5719-llvm-a971003e46774281f768c7f59c575827f60f27b4.tar.gz
bcm5719-llvm-a971003e46774281f768c7f59c575827f60f27b4.zip
Revert Refactor constant evaluation of typeid(T) to track a symbolic type_info object rather than tracking the originating expression.
This reverts r360974 (git commit 7ee4307bd4450022c3c8777f43a40cc4f0ccc009) llvm-svn: 360988
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 70904b192a3..dd71cf02d95 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -1735,17 +1735,6 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) {
return nullptr;
}
- // Handle typeid(T).
- if (TypeInfoLValue TI = base.dyn_cast<TypeInfoLValue>()) {
- llvm::Type *StdTypeInfoPtrTy =
- CGM.getTypes().ConvertType(base.getTypeInfoType())->getPointerTo();
- llvm::Constant *TypeInfo =
- CGM.GetAddrOfRTTIDescriptor(QualType(TI.getType(), 0));
- if (TypeInfo->getType() != StdTypeInfoPtrTy)
- TypeInfo = llvm::ConstantExpr::getBitCast(TypeInfo, StdTypeInfoPtrTy);
- return TypeInfo;
- }
-
// Otherwise, it must be an expression.
return Visit(base.get<const Expr*>());
}
OpenPOWER on IntegriCloud