[llvm-branch-commits] [llvm-branch] r99386 - /llvm/branches/ggreif/InvokeInst-operands/lib/VMCore/Verifier.cpp
Gabor Greif
ggreif at gmail.com
Tue Mar 23 22:37:15 PDT 2010
Author: ggreif
Date: Wed Mar 24 00:37:15 2010
New Revision: 99386
URL: http://llvm.org/viewvc/llvm-project?rev=99386&view=rev
Log:
zap loop, we already have a better weapon
Modified:
llvm/branches/ggreif/InvokeInst-operands/lib/VMCore/Verifier.cpp
Modified: llvm/branches/ggreif/InvokeInst-operands/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/InvokeInst-operands/lib/VMCore/Verifier.cpp?rev=99386&r1=99385&r2=99386&view=diff
==============================================================================
--- llvm/branches/ggreif/InvokeInst-operands/lib/VMCore/Verifier.cpp (original)
+++ llvm/branches/ggreif/InvokeInst-operands/lib/VMCore/Verifier.cpp Wed Mar 24 00:37:15 2010
@@ -676,17 +676,13 @@
"blockaddress may not be used with the entry block!", Entry);
}
}
-
+
// If this function is actually an intrinsic, verify that it is only used in
// direct call/invokes, never having its "address taken".
if (F.getIntrinsicID()) {
- for (Value::use_iterator UI = F.use_begin(), E = F.use_end(); UI != E;++UI){
- User *U = cast<User>(UI);
- if ((isa<CallInst>(U) || isa<InvokeInst>(U)) && UI.getOperandNo() == 0)
- continue; // Direct calls/invokes are ok.
-
+ const User *U;
+ if (F.hasAddressTaken(&U))
Assert1(0, "Invalid user of intrinsic instruction!", U);
- }
}
}
More information about the llvm-branch-commits
mailing list