diff options
author | Lang Hames <lhames@gmail.com> | 2015-09-28 20:52:21 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-09-28 20:52:21 +0000 |
commit | 9a4c94ec5a06426bba799f8551c241f1979c368f (patch) | |
tree | fc7a738ba2179e89ba7e83e067bbf91ea1460190 /lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | |
parent | 16c4da03d5c8741a4ebbc4bec76c3bfa0c0259c3 (diff) | |
download | bcm5719-llvm-9a4c94ec5a06426bba799f8551c241f1979c368f.tar.gz bcm5719-llvm-9a4c94ec5a06426bba799f8551c241f1979c368f.zip |
[lld][MachO] Fix a think-o to get the twolevel/dynamic_lookup test passing.
llvm-svn: 248736
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp index 3b9406d745c..d8cc133cb5f 100644 --- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp @@ -720,12 +720,10 @@ void MachOLinkingContext::createImplicitFiles( // Let writer add output type specific extras. writer().createImplicitFiles(result); - // If we're using flat namespace or undefinedMode is != error, add a - // FlatNamespaceFile instance. This will provide a SharedLibraryAtom for - // symbols that aren't defined elsewhere. - if (useFlatNamespace() && undefinedMode() != UndefinedMode::error) { - bool warnOnUndef = undefinedMode() == UndefinedMode::warning; - result.emplace_back(new mach_o::FlatNamespaceFile(*this, warnOnUndef)); + // If undefinedMode is != error, add a FlatNamespaceFile instance. This will + // provide a SharedLibraryAtom for symbols that aren't defined elsewhere. + if (undefinedMode() != UndefinedMode::error) { + result.emplace_back(new mach_o::FlatNamespaceFile(*this)); _flatNamespaceFile = result.back().get(); } } |