[llvm-commits] [llvm] r111803 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp utils/TableGen/ClangAttrEmitter.cpp
Chandler Carruth
chandlerc at gmail.com
Mon Aug 23 01:25:07 PDT 2010
Author: chandlerc
Date: Mon Aug 23 03:25:07 2010
New Revision: 111803
URL: http://llvm.org/viewvc/llvm-project?rev=111803&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=111803&r1=111802&r2=111803&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Aug 23 03:25:07 2010
@@ -1327,7 +1327,7 @@
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.
Modified: llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=111803&r1=111802&r2=111803&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/ClangAttrEmitter.cpp Mon Aug 23 03:25:07 2010
@@ -71,6 +71,7 @@
upperName[0] = std::toupper(upperName[0]);
}
}
+ virtual ~Argument() {}
StringRef getLowerName() const { return lowerName; }
StringRef getUpperName() const { return upperName; }
More information about the llvm-commits
mailing list