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:
Sean Callanan 2010-12-06 00:56:39 +00:00
parent abd6d2742a
commit 14f0b0e8d5
1 changed files with 3 additions and 0 deletions

View File

@ -870,6 +870,9 @@ IRForTarget::MaybeHandleVariable (Module &llvm_module, Value *llvm_value_ptr)
if (IsObjCSelectorRef(llvm_value_ptr))
return true;
if (!global_variable->hasExternalLinkage())
return true;
if (log)
log->Printf("Found global variable \"%s\" without metadata", global_variable->getName().str().c_str());
return false;