GlobalValue with InternalLinkage may have operands with ExternalLinkage

type. Do not ignore these operands while finding external references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-09-14 01:35:13 +00:00
parent 57d12f962d
commit 97d92d50aa

View File

@ -93,7 +93,7 @@ findExternalRefs(Value *value, std::set<std::string> &references,
if (lt != LTOInternalLinkage && strncmp (gv->getName().c_str(), "llvm.", 5))
references.insert(mangler.getValueName(gv));
}
else if (Constant *c = dyn_cast<Constant>(value))
if (Constant *c = dyn_cast<Constant>(value))
// Handle ConstantExpr, ConstantStruct, ConstantArry etc..
for (unsigned i = 0, e = c->getNumOperands(); i != e; ++i)
findExternalRefs(c->getOperand(i), references, mangler);