aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-01-15 20:52:09 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-01-15 20:52:09 +0000
commit3d69041abe8a9833e78f645f0d4d7b95b802e3c4 (patch)
tree657f7acaa097bc7524b002f46e97bbff4e7b6e85 /lib/Linker
parent12bfff440700c58bc67e9f9d8f99121632022cf1 (diff)
downloadexternal_llvm-3d69041abe8a9833e78f645f0d4d7b95b802e3c4.zip
external_llvm-3d69041abe8a9833e78f645f0d4d7b95b802e3c4.tar.gz
external_llvm-3d69041abe8a9833e78f645f0d4d7b95b802e3c4.tar.bz2
[Linker] Drop asserts that are embedded in cast<> and now checked by the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 41ec114..e34dbcb 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -1001,19 +1001,10 @@ categorizeModuleFlagNodes(const NamedMDNode *ModFlags,
for (unsigned I = 0, E = ModFlags->getNumOperands(); I != E; ++I) {
MDNode *Op = ModFlags->getOperand(I);
- assert(Op->getNumOperands() == 3 && "Invalid module flag metadata!");
- assert(isa<ConstantInt>(Op->getOperand(0)) &&
- "Module flag's first operand must be an integer!");
- assert(isa<MDString>(Op->getOperand(1)) &&
- "Module flag's second operand must be an MDString!");
-
ConstantInt *Behavior = cast<ConstantInt>(Op->getOperand(0));
MDString *ID = cast<MDString>(Op->getOperand(1));
Value *Val = Op->getOperand(2);
switch (Behavior->getZExtValue()) {
- default:
- assert(false && "Invalid behavior in module flag metadata!");
- break;
case Module::Error: {
MDNode *&ErrNode = ErrorNode[ID];
if (!ErrNode) ErrNode = Op;
@@ -1126,8 +1117,6 @@ bool ModuleLinker::linkModuleFlagsMetadata() {
for (SmallSetVector<MDNode*, 8>::iterator
II = Set.begin(), IE = Set.end(); II != IE; ++II) {
MDNode *Node = *II;
- assert(isa<MDNode>(Node->getOperand(2)) &&
- "Module flag's third operand must be an MDNode!");
MDNode *Val = cast<MDNode>(Node->getOperand(2));
MDString *ReqID = cast<MDString>(Val->getOperand(0));