From 54f616304240fcbc41ca9b9b2af38eeb1171e8a8 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 23 Aug 2010 08:25:07 +0000 Subject: Fix some GCC warnings by providing a virtual destructor in the base of a class hierarchy with virtual methods and using llvm_unreachable to properly indicate unreachable states which would otherwise leave variables uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111803 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp') diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index c9ad3ca5bf..5f555934ba 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1327,7 +1327,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { break; case ISD::SEXTLOAD: ExtendOp = ISD::SIGN_EXTEND; break; case ISD::ZEXTLOAD: ExtendOp = ISD::ZERO_EXTEND; break; - default: assert(0 && "Unexpected extend load type!"); + default: llvm_unreachable("Unexpected extend load type!"); } Result = DAG.getNode(ExtendOp, dl, Node->getValueType(0), Load); Tmp1 = LegalizeOp(Result); // Relegalize new nodes. -- cgit v1.2.3