From 97d92d50aa52fd7f891ddeaf9e3886305a5a77d9 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 14 Sep 2006 01:35:13 +0000 Subject: [PATCH] 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 --- tools/lto/lto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index 05114b7f329..9dfc45676df 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -93,7 +93,7 @@ findExternalRefs(Value *value, std::set &references, if (lt != LTOInternalLinkage && strncmp (gv->getName().c_str(), "llvm.", 5)) references.insert(mangler.getValueName(gv)); } - else if (Constant *c = dyn_cast(value)) + if (Constant *c = dyn_cast(value)) // Handle ConstantExpr, ConstantStruct, ConstantArry etc.. for (unsigned i = 0, e = c->getNumOperands(); i != e; ++i) findExternalRefs(c->getOperand(i), references, mangler);