diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-01-18 02:00:16 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-01-18 02:00:16 +0000 |
commit | 8dfa5f1776c2703bba757c388acf90c7fd8551b4 (patch) | |
tree | 49cbe6a9f4573808eb03cc846d95b3813e4c1de1 /clang/lib/CodeGen | |
parent | e46bc4cec56c56e60e3ba034ffbf834fadd63cec (diff) | |
download | bcm5719-llvm-8dfa5f1776c2703bba757c388acf90c7fd8551b4.tar.gz bcm5719-llvm-8dfa5f1776c2703bba757c388acf90c7fd8551b4.zip |
Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.
llvm-svn: 123719
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 7 |
4 files changed, 4 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 4c6d8419629..e6af820d77a 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2081,7 +2081,6 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, llvm::Value *Callee, const FunctionType *FnType = cast<FunctionType>(cast<PointerType>(CalleeType)->getPointeeType()); - QualType ResultType = FnType->getResultType(); CallArgList Args; EmitCallArgs(Args, dyn_cast<FunctionProtoType>(FnType), ArgBeg, ArgEnd); @@ -2108,4 +2107,3 @@ EmitPointerToDataMemberBinaryExpr(const BinaryOperator *E) { return MakeAddrLValue(AddV, MPT->getPointeeType()); } - diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 5c4d0a56088..bdd245414be 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -538,7 +538,7 @@ EmitCompoundAssignLValue(const CompoundAssignOperator *E, ComplexPairTy &Val) { TestAndClearIgnoreReal(); TestAndClearIgnoreImag(); - QualType LHSTy = E->getLHS()->getType(), RHSTy = E->getRHS()->getType(); + QualType LHSTy = E->getLHS()->getType(); BinOpInfo OpInfo; diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index c7e0837b3dc..c7f834acb6f 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -434,7 +434,6 @@ void CodeGenFunction::GenerateObjCCtorDtorMethod(ObjCImplementationDecl *IMP, for (unsigned I = 0, E = IvarInitializers.size(); I != E; ++I) { CXXCtorInitializer *IvarInit = IvarInitializers[I]; FieldDecl *Field = IvarInit->getAnyMember(); - QualType FieldType = Field->getType(); ObjCIvarDecl *Ivar = cast<ObjCIvarDecl>(Field); LValue LV = EmitLValueForIvar(TypeOfSelfObject(), LoadObjCSelf(), Ivar, 0); @@ -860,5 +859,3 @@ void CodeGenFunction::EmitObjCAtSynchronizedStmt( } CGObjCRuntime::~CGObjCRuntime() {} - - diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 554d2403c01..edc03b1bd1e 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -349,11 +349,11 @@ ItaniumCXXABI::EmitMemberPointerConversion(CodeGenFunction &CGF, bool DerivedToBase = E->getCastKind() == CK_DerivedToBaseMemberPointer; - const CXXRecordDecl *BaseDecl, *DerivedDecl; + const CXXRecordDecl *DerivedDecl; if (DerivedToBase) - DerivedDecl = SrcDecl, BaseDecl = DestDecl; + DerivedDecl = SrcDecl; else - BaseDecl = SrcDecl, DerivedDecl = DestDecl; + DerivedDecl = DestDecl; llvm::Constant *Adj = CGF.CGM.GetNonVirtualBaseClassOffset(DerivedDecl, @@ -1000,7 +1000,6 @@ void ARMCXXABI::ReadArrayCookie(CodeGenFunction &CGF, // The cookie size is always 2 * sizeof(size_t). CookieSize = 2 * SizeSize; - CharUnits NumElementsOffset = CookieSize - SizeSize; // The allocated pointer is the input ptr, minus that amount. AllocPtr = CGF.Builder.CreateBitCast(Ptr, CharPtrTy); |