Fixed the logic in IRForTarget that recognizes

externally-defined variables to match up with
the code in ClangASTSource that produces them.

llvm-svn: 119750
This commit is contained in:
Sean Callanan 2010-11-18 22:21:58 +00:00
parent cd68095650
commit 7a55a32108
1 changed files with 4 additions and 4 deletions

View File

@ -362,9 +362,7 @@ IRForTarget::rewriteObjCConstString(llvm::Module &M,
CFSCWB_arguments.end(),
"CFStringCreateWithBytes",
FirstEntryInstruction);
Constant *initializer = NSStr->getInitializer();
if (!UnfoldConstant(NSStr, CFSCWB_call, FirstEntryInstruction))
{
if (log)
@ -1089,11 +1087,13 @@ bool
IRForTarget::resolveExternals(Module &M,
Function &F)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
for (Module::global_iterator global = M.global_begin(), end = M.global_end();
global != end;
++global)
{
if ((*global).hasExternalLinkage() &&
if (DeclForGlobalValue(M, global) &&
!MaybeHandleVariable (M, global))
return false;
}