Delete unnecessary generality in loadFile.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 24 Apr 2015 15:51:45 +0000 (15:51 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 24 Apr 2015 15:51:45 +0000 (15:51 +0000)
commitc08ab8e6e4559b6ba5bc16f70c75da86bd278a4f
tree3c1f6055eb6cdfe718ae69a25ccf9371227ac302
parentaf9fdb9dcfec7fd26dd8085a6311035cd7e863ae
Delete unnecessary generality in loadFile.

loadFile could load mulitple files just because yaml has a feature for
putting multiple documents in one file.

Designing a linker around what yaml can do seems like a bad idea to
me. This patch changes it to read a single file.

There are further improvements to be done to the api and they
will follow shortly.

llvm-svn: 235724
139 files changed:
lld/include/lld/Core/Reader.h
lld/lib/Core/Reader.cpp
lld/lib/Driver/DarwinLdDriver.cpp
lld/lib/Driver/Driver.cpp
lld/lib/ReaderWriter/ELF/ELFReader.h
lld/lib/ReaderWriter/FileArchive.cpp
lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
lld/test/core/Inputs/archive-basic.objtxt [new file with mode: 0644]
lld/test/core/Inputs/archive-chain.objtxt [new file with mode: 0644]
lld/test/core/Inputs/archive-chain2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/archive-tentdef-search.objtxt [new file with mode: 0644]
lld/test/core/Inputs/associates.objtxt [new file with mode: 0644]
lld/test/core/Inputs/auto-hide-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/code-model-attributes.objtxt [new file with mode: 0644]
lld/test/core/Inputs/code-model-attributes2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/code-model-attributes3.objtxt [new file with mode: 0644]
lld/test/core/Inputs/code-model-attributes4.objtxt [new file with mode: 0644]
lld/test/core/Inputs/code-model-attributes5.objtxt [new file with mode: 0644]
lld/test/core/Inputs/constants-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/constants-coalesce2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/cstring-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/cstring-coalesce2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/custom-section-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/custom-section-coalesce2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/dead-strip-attributes.objtxt [new file with mode: 0644]
lld/test/core/Inputs/dead-strip-attributes2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/dead-strip-basic.objtxt [new file with mode: 0644]
lld/test/core/Inputs/dead-strip-basic2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/dead-strip-globals.objtxt [new file with mode: 0644]
lld/test/core/Inputs/dead-strip-globals2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/error-duplicate-absolutes.objtxt [new file with mode: 0644]
lld/test/core/Inputs/gnulinkonce-rearrange-resolve.objtxt [new file with mode: 0644]
lld/test/core/Inputs/gnulinkonce-remaining-undef.objtxt [new file with mode: 0644]
lld/test/core/Inputs/gnulinkonce-remaining-undef2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/gnulinkonce-resolve.objtxt [new file with mode: 0644]
lld/test/core/Inputs/gnulinkonce-simple.objtxt [new file with mode: 0644]
lld/test/core/Inputs/inline-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/inline-coalesce2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/multiple-def-error.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-deadstrip.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-gnulinkonce-error.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-rearrange-resolve.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-remaining-undef.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-remaining-undef2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-resolve.objtxt [new file with mode: 0644]
lld/test/core/Inputs/sectiongroup-simple.objtxt [new file with mode: 0644]
lld/test/core/Inputs/shared-library-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/tent-merge.objtxt [new file with mode: 0644]
lld/test/core/Inputs/undef-coalesce-error.objtxt [new file with mode: 0644]
lld/test/core/Inputs/undef-coalesce-error2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/undef-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/undef-coalesce2.objtxt [new file with mode: 0644]
lld/test/core/Inputs/undef-fallback.objtxt [new file with mode: 0644]
lld/test/core/Inputs/undef-weak-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/weak-coalesce.objtxt [new file with mode: 0644]
lld/test/core/Inputs/weak-coalesce2.objtxt [new file with mode: 0644]
lld/test/core/archive-basic.objtxt
lld/test/core/archive-chain.objtxt
lld/test/core/archive-tentdef-search.objtxt
lld/test/core/associates.objtxt
lld/test/core/auto-hide-coalesce.objtxt
lld/test/core/code-model-attributes.objtxt
lld/test/core/constants-coalesce.objtxt
lld/test/core/cstring-coalesce.objtxt
lld/test/core/custom-section-coalesce.objtxt
lld/test/core/dead-strip-attributes.objtxt
lld/test/core/dead-strip-basic.objtxt
lld/test/core/dead-strip-globals.objtxt
lld/test/core/error-duplicate-absolutes.objtxt
lld/test/core/gnulinkonce-rearrange-resolve.objtxt
lld/test/core/gnulinkonce-remaining-undef.objtxt
lld/test/core/gnulinkonce-resolve.objtxt
lld/test/core/gnulinkonce-simple.objtxt
lld/test/core/inline-coalesce.objtxt
lld/test/core/multiple-def-error.objtxt
lld/test/core/sectiongroup-deadstrip.objtxt
lld/test/core/sectiongroup-gnulinkonce-error.objtxt
lld/test/core/sectiongroup-rearrange-resolve.objtxt
lld/test/core/sectiongroup-remaining-undef.objtxt
lld/test/core/sectiongroup-resolve.objtxt
lld/test/core/sectiongroup-simple.objtxt
lld/test/core/shared-library-coalesce.objtxt
lld/test/core/tent-merge.objtxt
lld/test/core/undef-coalesce-error.objtxt
lld/test/core/undef-coalesce.objtxt
lld/test/core/undef-fallback.objtxt
lld/test/core/undef-weak-coalesce.objtxt
lld/test/core/weak-coalesce.objtxt
lld/test/darwin/Inputs/native-and-mach-o.objtxt [new file with mode: 0644]
lld/test/darwin/Inputs/native-and-mach-o2.objtxt [new file with mode: 0644]
lld/test/darwin/native-and-mach-o.objtxt
lld/test/elf/Inputs/allowduplicates.objtxt [new file with mode: 0644]
lld/test/elf/allowduplicates.objtxt
lld/test/lit.cfg
lld/test/mach-o/Inputs/PIE.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/arm-interworking.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/arm-shims.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/cstring-sections.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/got-order.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/got-order2.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/hello-world-arm64.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/hello-world-armv6.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/hello-world-armv7.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/hello-world-x86.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/hello-world-x86_64.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/interposing-section.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/lazy-bind-x86_64-2.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/lazy-bind-x86_64-3.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/lazy-bind-x86_64.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/linker-as-ld.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/re-exported-dylib-ordinal.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/re-exported-dylib-ordinal2.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/re-exported-dylib-ordinal3.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/unwind-info-simple-arm64.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/use-simple-dylib.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/write-final-sections.yaml [new file with mode: 0644]
lld/test/mach-o/Inputs/wrong-arch-error.yaml [new file with mode: 0644]
lld/test/mach-o/PIE.yaml
lld/test/mach-o/arm-interworking.yaml
lld/test/mach-o/arm-shims.yaml
lld/test/mach-o/cstring-sections.yaml
lld/test/mach-o/got-order.yaml
lld/test/mach-o/hello-world-arm64.yaml
lld/test/mach-o/hello-world-armv6.yaml
lld/test/mach-o/hello-world-armv7.yaml
lld/test/mach-o/hello-world-x86.yaml
lld/test/mach-o/hello-world-x86_64.yaml
lld/test/mach-o/interposing-section.yaml
lld/test/mach-o/lazy-bind-x86_64.yaml
lld/test/mach-o/linker-as-ld.yaml
lld/test/mach-o/re-exported-dylib-ordinal.yaml
lld/test/mach-o/unwind-info-simple-arm64.yaml
lld/test/mach-o/use-simple-dylib.yaml
lld/test/mach-o/write-final-sections.yaml
lld/test/mach-o/wrong-arch-error.yaml