Fixed a problem in which non-external variables
(for example, string literals) were being flagged erroneously as undefined external variables. llvm-svn: 120972
This commit is contained in:
parent
abd6d2742a
commit
14f0b0e8d5
|
@ -870,6 +870,9 @@ IRForTarget::MaybeHandleVariable (Module &llvm_module, Value *llvm_value_ptr)
|
||||||
if (IsObjCSelectorRef(llvm_value_ptr))
|
if (IsObjCSelectorRef(llvm_value_ptr))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (!global_variable->hasExternalLinkage())
|
||||||
|
return true;
|
||||||
|
|
||||||
if (log)
|
if (log)
|
||||||
log->Printf("Found global variable \"%s\" without metadata", global_variable->getName().str().c_str());
|
log->Printf("Found global variable \"%s\" without metadata", global_variable->getName().str().c_str());
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue