summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-03-22 20:54:47 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-03-22 20:54:47 +0000
commit3023ca870d545685881116f2c6e2bd5d1736e33c (patch)
tree427ac2262111df7038273e8219440b258109e719
parent4681ebd429846ed98e7beaf49934fa347ff22152 (diff)
downloadclang-3023ca870d545685881116f2c6e2bd5d1736e33c.tar.gz
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGExprAgg.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index ff107f9da4..f3c1a9187b 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -47,8 +47,6 @@ public:
/// represents a value lvalue, this method emits the address of the lvalue,
/// then loads the result into DestPtr.
void EmitAggLoadOfLValue(const Expr *E);
-
- void EmitNonConstInit(InitListExpr *E);
//===--------------------------------------------------------------------===//
// Visitor Methods
@@ -290,45 +288,6 @@ void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
CGF.EmitAggregateCopy(DestPtr, ArgPtr, VE->getType());
}
-void AggExprEmitter::EmitNonConstInit(InitListExpr *E) {
- const llvm::PointerType *APType =
- cast<llvm::PointerType>(DestPtr->getType());
- const llvm::Type *DestType = APType->getElementType();
-
- if (E->hadArrayRangeDesignator()) {
- CGF.ErrorUnsupported(E, "GNU array range designator extension");
- }
-
- if (const llvm::ArrayType *AType = dyn_cast<llvm::ArrayType>(DestType)) {
- unsigned NumInitElements = E->getNumInits();
-
- unsigned i;
- for (i = 0; i != NumInitElements; ++i) {
- llvm::Value *NextVal = Builder.CreateStructGEP(DestPtr, i, ".array");
- Expr *Init = E->getInit(i);
- if (isa<InitListExpr>(Init))
- CGF.EmitAggExpr(Init, NextVal, VolatileDest);
- else
- // FIXME: volatility
- Builder.CreateStore(CGF.EmitScalarExpr(Init), NextVal);
- }
-
- // Emit remaining default initializers
- unsigned NumArrayElements = AType->getNumElements();
- QualType QType = E->getInit(0)->getType();
- const llvm::Type *EType = AType->getElementType();
- for (/*Do not initialize i*/; i < NumArrayElements; ++i) {
- llvm::Value *NextVal = Builder.CreateStructGEP(DestPtr, i, ".array");
- if (EType->isSingleValueType())
- // FIXME: volatility
- Builder.CreateStore(llvm::Constant::getNullValue(EType), NextVal);
- else
- CGF.EmitAggregateClear(NextVal, QType);
- }
- } else
- assert(false && "Invalid initializer");
-}
-
void AggExprEmitter::EmitInitializationToLValue(Expr* E, LValue LV) {
// FIXME: Are initializers affected by volatile?
if (isa<ImplicitValueInitExpr>(E)) {