add assert in argpromotion, which cannot trigger

if Function::hasAddressTaken works as advertised

also included some cosmetic cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif
2010-03-23 14:40:20 +00:00
parent 050560e535
commit 0054c7a867
2 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -400,8 +400,8 @@ Function *Intrinsic::getDeclaration(Module *M, ID id, const Type **Tys,
#include "llvm/Intrinsics.gen"
#undef GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN
/// hasAddressTaken - returns true if there are any uses of this function
/// other than direct calls or invokes to it.
/// hasAddressTaken - returns true if there are any uses of this function
/// other than direct calls or invokes to it.
bool Function::hasAddressTaken() const {
for (Value::use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) {
if (I.getOperandNo() != 0 ||