zap dead code.
authorChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 01:13:54 +0000 (01:13 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 01:13:54 +0000 (01:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112130 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/StructRetPromotion.cpp

index aa470b954d6a5ad53fd635608cecba1238b5d7df..b82b03f7d9e7d198ddc159b680ba43871da8a4b6 100644 (file)
@@ -1,4 +1,4 @@
-//===-- StructRetPromotion.cpp - Promote sret arguments ------------------===//
+//===-- StructRetPromotion.cpp - Promote sret arguments -------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -57,7 +57,6 @@ namespace {
     bool isSafeToUpdateAllCallers(Function *F);
     Function *cloneFunctionBody(Function *F, const StructType *STy);
     CallGraphNode *updateCallSites(Function *F, Function *NF);
-    bool nestedStructType(const StructType *STy);
   };
 }
 
@@ -351,14 +350,3 @@ CallGraphNode *SRETPromotion::updateCallSites(Function *F, Function *NF) {
   return NF_CGN;
 }
 
-/// nestedStructType - Return true if STy includes any
-/// other aggregate types
-bool SRETPromotion::nestedStructType(const StructType *STy) {
-  unsigned Num = STy->getNumElements();
-  for (unsigned i = 0; i < Num; i++) {
-    const Type *Ty = STy->getElementType(i);
-    if (!Ty->isSingleValueType() && !Ty->isVoidTy())
-      return true;
-  }
-  return false;
-}