forked from OSchip/llvm-project
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:
parent
cd68095650
commit
7a55a32108
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue