]> granicus.if.org Git - clang/commitdiff
Remove dead variables.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 18 Jun 2011 10:34:07 +0000 (10:34 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 18 Jun 2011 10:34:07 +0000 (10:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133346 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGObjC.cpp
lib/Parse/ParseObjc.cpp

index a79f031ec0a4a1b76d2245e9d5f05b984116ffc7..a12365e8e4feb4a86f9b4db2fdf698988f00d4ac 100644 (file)
@@ -463,7 +463,6 @@ void CodeGenFunction::EmitScalarInit(const Expr *init,
                                      const ValueDecl *D,
                                      LValue lvalue,
                                      bool capturedByInit) {
-  QualType type = lvalue.getType();
   Qualifiers::ObjCLifetime lifetime = lvalue.getObjCLifetime();
   if (!lifetime) {
     llvm::Value *value = EmitScalarExpr(init);
index 0e68c3e2f341aa9119ceedd66f7261791f859183..20ccdb7f9cb8c58e61ee26f5b17ac20d687d4d10 100644 (file)
@@ -2111,7 +2111,6 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E,
       // Automatic Reference Counting:
       //   If the pseudo-expression names a retainable object with weak or
       //   strong lifetime, the object shall be released.
-      bool isNonGC = false;
       Expr *BaseExpr = PseudoDtor->getBase();
       llvm::Value *BaseValue = NULL;
       Qualifiers BaseQuals;
@@ -2123,8 +2122,6 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E,
         BaseQuals = PTy->getPointeeType().getQualifiers();
       } else {
         LValue BaseLV = EmitLValue(BaseExpr);
-        if (BaseLV.isNonGC())
-          isNonGC = true;
         BaseValue = BaseLV.getAddress();
         QualType BaseTy = BaseExpr->getType();
         BaseQuals = BaseTy.getQualifiers();
index ce9c262fd8efed09b4c94bc21d1d994516fa5068..ede2302403c7d371516cdad4b1d8fea5177ef6a9 100644 (file)
@@ -2226,8 +2226,6 @@ static llvm::Value *emitARCRetainAfterCall(CodeGenFunction &CGF,
 
 static TryEmitResult
 tryEmitARCRetainScalarExpr(CodeGenFunction &CGF, const Expr *e) {
-  QualType originalType = e->getType();
-
   // The desired result type, if it differs from the type of the
   // ultimate opaque expression.
   const llvm::Type *resultType = 0;
index 4f28321827a286cb3f796d100a08adcf90cc4373..8a6c9642143552beee1a99e111af56e47b1dd9cc 100644 (file)
@@ -864,7 +864,6 @@ Decl *Parser::ParseObjCMethodDecl(SourceLocation mLoc,
   }
 
   // Now parse the selector.
-  SourceLocation SelectorStartLoc = Tok.getLocation();
   SourceLocation selLoc;
   IdentifierInfo *SelIdent = ParseObjCSelectorPiece(selLoc);