summaryrefslogtreecommitdiff
path: root/tools/lto/lto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto/lto.cpp')
-rw-r--r--tools/lto/lto.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp
index 9dfc45676d..7f1ec1ac34 100644
--- a/tools/lto/lto.cpp
+++ b/tools/lto/lto.cpp
@@ -93,6 +93,9 @@ findExternalRefs(Value *value, std::set<std::string> &references,
if (lt != LTOInternalLinkage && strncmp (gv->getName().c_str(), "llvm.", 5))
references.insert(mangler.getValueName(gv));
}
+
+ // GlobalValue, even with InternalLinkage type, may have operands with
+ // ExternalLinkage type. Do not ignore these operands.
if (Constant *c = dyn_cast<Constant>(value))
// Handle ConstantExpr, ConstantStruct, ConstantArry etc..
for (unsigned i = 0, e = c->getNumOperands(); i != e; ++i)