Fixed a bug where the variable-resolution code

would occasionally try to resolve the placeholder
variable used for static data allocation.

llvm-svn: 144677
This commit is contained in:
Sean Callanan 2011-11-15 19:13:54 +00:00
parent 7359122ba5
commit fe5d139b51
1 changed files with 3 additions and 0 deletions

View File

@ -1499,6 +1499,9 @@ IRForTarget::MaterializeInternalVariable (GlobalVariable *global_variable)
if (GlobalVariable::isExternalLinkage(global_variable->getLinkage()))
return false;
if (global_variable == m_reloc_placeholder)
return true;
uint64_t offset = m_data_allocator->GetStream().GetSize();
llvm::Type *variable_type = global_variable->getType();