diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-23 20:26:49 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-23 20:26:49 +0000 |
commit | aa347f9392f8c5333eb2b889716d64a50805813d (patch) | |
tree | ef1e1f14dc42d81abd2152c527b93571f95a1ccd /clang/lib/CodeGen | |
parent | b1fa14883755af470c8b3ffab3aedb477a899854 (diff) | |
download | bcm5719-llvm-aa347f9392f8c5333eb2b889716d64a50805813d.tar.gz bcm5719-llvm-aa347f9392f8c5333eb2b889716d64a50805813d.zip |
Removing a bunch of dead returns/breaks after llvm_unreachables.
llvm-svn: 140407
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.cpp | 1 | ||||
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 1 |
13 files changed, 0 insertions, 25 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index c246c3cb359..665263d5505 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1864,7 +1864,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } llvm_unreachable("Unhandled ABIArgInfo::Kind"); - return RValue::get(0); } /* VarArg handling */ diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 04bf996acde..fed79db9b0b 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -291,16 +291,12 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) { switch (BT->getKind()) { case BuiltinType::Dependent: llvm_unreachable("Unexpected builtin type Dependent"); - return llvm::DIType(); case BuiltinType::Overload: llvm_unreachable("Unexpected builtin type Overload"); - return llvm::DIType(); case BuiltinType::BoundMember: llvm_unreachable("Unexpected builtin type BoundMember"); - return llvm::DIType(); case BuiltinType::UnknownAny: llvm_unreachable("Unexpected builtin type UnknownAny"); - return llvm::DIType(); case BuiltinType::NullPtr: return DBuilder. createNullPtrType(BT->getName(CGM.getContext().getLangOptions())); diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index f3996c9659d..60ce3226a8a 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1795,7 +1795,6 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { return EmitFunctionDeclLValue(*this, E, FD); llvm_unreachable("Unhandled member declaration!"); - return LValue(); } LValue CodeGenFunction::EmitLValueForBitfield(llvm::Value *BaseValue, diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index c321faffcfd..28c60a05d05 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -320,7 +320,6 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { case CK_UncheckedDerivedToBase: { llvm_unreachable("cannot perform hierarchy conversion in EmitAggExpr: " "should have been unpacked before we got here"); - break; } case CK_GetObjCProperty: { diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 13c96d4fae5..f353fa25237 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -104,7 +104,6 @@ public: ComplexPairTy VisitStmt(Stmt *S) { S->dump(CGF.getContext().getSourceManager()); llvm_unreachable("Stmt can't have complex result type!"); - return ComplexPairTy(); } ComplexPairTy VisitExpr(Expr *S); ComplexPairTy VisitParenExpr(ParenExpr *PE) { return Visit(PE->getSubExpr());} diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 2de13a4090d..1176eb1f9bf 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -781,9 +781,6 @@ public: return 0; llvm_unreachable("Unable to handle InitListExpr"); - // Get rid of control reaches end of void function warning. - // Not reached. - return 0; } llvm::Constant *VisitCXXConstructExpr(CXXConstructExpr *E) { @@ -967,7 +964,6 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, switch (Result.Val.getKind()) { case APValue::Uninitialized: llvm_unreachable("Constant expressions should be initialized."); - return 0; case APValue::LValue: { llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType); llvm::Constant *Offset = diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 90e12327156..264a71403ab 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -154,7 +154,6 @@ public: Value *VisitStmt(Stmt *S) { S->dump(CGF.getContext().getSourceManager()); llvm_unreachable("Stmt can't have complex result type!"); - return 0; } Value *VisitExpr(Expr *S); @@ -1264,10 +1263,8 @@ EmitAddConsiderOverflowBehavior(const UnaryOperator *E, BinOp.Opcode = BO_Add; BinOp.E = E; return EmitOverflowCheckedBinOp(BinOp); - break; } llvm_unreachable("Unknown SignedOverflowBehaviorTy"); - return 0; } llvm::Value * @@ -2756,7 +2753,6 @@ LValue CodeGenFunction::EmitCompoundAssignmentLValue( case BO_Assign: case BO_Comma: llvm_unreachable("Not valid compound assignment operators"); - break; } llvm_unreachable("Unhandled compound assignment operator"); diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index be574b3efeb..1058886e612 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -1061,7 +1061,6 @@ public: /// class of the given name. virtual llvm::GlobalVariable *GetClassGlobal(const std::string &Name) { llvm_unreachable("CGObjCMac::GetClassGlobal"); - return 0; } }; diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 3f986bd1cd6..bc34848ccfa 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -139,11 +139,9 @@ void CodeGenFunction::EmitStmt(const Stmt *S) { case Stmt::ObjCAtCatchStmtClass: llvm_unreachable( "@catch statements should be handled by EmitObjCAtTryStmt"); - break; case Stmt::ObjCAtFinallyStmtClass: llvm_unreachable( "@finally statements should be handled by EmitObjCAtTryStmt"); - break; case Stmt::ObjCAtThrowStmtClass: EmitObjCAtThrowStmt(cast<ObjCAtThrowStmt>(*S)); break; diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 1a210faa33f..f936a9b89de 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -264,7 +264,6 @@ static BaseOffset ComputeBaseOffset(ASTContext &Context, if (!const_cast<CXXRecordDecl *>(DerivedRD)-> isDerivedFrom(const_cast<CXXRecordDecl *>(BaseRD), Paths)) { llvm_unreachable("Class must be derived from the passed in base class!"); - return BaseOffset(); } return ComputeBaseOffset(Context, DerivedRD, Paths.front()); @@ -701,7 +700,6 @@ CharUnits VCallOffsetMap::getVCallOffsetOffset(const CXXMethodDecl *MD) { } llvm_unreachable("Should always find a vcall offset offset!"); - return CharUnits::Zero(); } /// VCallAndVBaseOffsetBuilder - Class for building vcall and vbase offsets. @@ -1362,7 +1360,6 @@ VTableBuilder::ComputeThisAdjustmentBaseOffset(BaseSubobject Base, if (!const_cast<CXXRecordDecl *>(DerivedRD)-> isDerivedFrom(const_cast<CXXRecordDecl *>(BaseRD), Paths)) { llvm_unreachable("Class must be derived from the passed in base class!"); - return BaseOffset(); } // We have to go through all the paths, and see which one leads us to the diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 3251b767425..f266ba9d3e8 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -276,7 +276,6 @@ static raw_ostream *GetOutputStream(CompilerInstance &CI, } llvm_unreachable("Invalid action!"); - return 0; } ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index 8742f5999b9..3032f820c66 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/lib/CodeGen/CodeGenTypes.cpp @@ -274,7 +274,6 @@ static llvm::Type *getTypeForFormat(llvm::LLVMContext &VMContext, if (&format == &llvm::APFloat::x87DoubleExtended) return llvm::Type::getX86_FP80Ty(VMContext); llvm_unreachable("Unknown float format!"); - return 0; } /// ConvertType - Convert the specified type to its LLVM form. diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 02e6a3be38c..9debf5ef4d9 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -1893,7 +1893,6 @@ ABIArgInfo X86_64ABIInfo::classifyArgumentType(QualType Ty, unsigned &neededInt, case X87: case ComplexX87: llvm_unreachable("Invalid classification for hi word."); - break; case NoClass: break; |