diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-04-10 21:23:51 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-04-10 21:23:51 +0000 |
| commit | aa7b304ea7788ecd95856570c88d4ecfafeae475 (patch) | |
| tree | c99cf787af61e25ed73316e612885f13755cd203 /lld/include | |
| parent | bd5ae6b4de63bffdfb34cc22313c50d1a0a8260e (diff) | |
| download | bcm5719-llvm-aa7b304ea7788ecd95856570c88d4ecfafeae475.tar.gz bcm5719-llvm-aa7b304ea7788ecd95856570c88d4ecfafeae475.zip | |
Remove the Native file format.
The Native file format was designed to be the fastest on-memory or
on-disk file format for object files. The problem is that no one
is working on that. No LLVM tools can produce object files in
the Native, thus the feature of supporting the format is useless
in the linker.
This patch removes the Native file support. We can add it back
if we really want it in future.
llvm-svn: 234641
Diffstat (limited to 'lld/include')
| -rw-r--r-- | lld/include/lld/Core/Error.h | 18 | ||||
| -rw-r--r-- | lld/include/lld/Core/LinkingContext.h | 11 | ||||
| -rw-r--r-- | lld/include/lld/Core/Reader.h | 3 | ||||
| -rw-r--r-- | lld/include/lld/Core/TODO.txt | 2 | ||||
| -rw-r--r-- | lld/include/lld/Core/Writer.h | 3 |
5 files changed, 7 insertions, 30 deletions
diff --git a/lld/include/lld/Core/Error.h b/lld/include/lld/Core/Error.h index 7caa25018f4..31cf8978f25 100644 --- a/lld/include/lld/Core/Error.h +++ b/lld/include/lld/Core/Error.h @@ -19,22 +19,6 @@ namespace lld { -const std::error_category &native_reader_category(); - -enum class NativeReaderError { - success = 0, - unknown_file_format, - file_too_short, - file_malformed, - unknown_chunk_type, - memory_error, - conflicting_target_machine, -}; - -inline std::error_code make_error_code(NativeReaderError e) { - return std::error_code(static_cast<int>(e), native_reader_category()); -} - const std::error_category &YamlReaderCategory(); enum class YamlReaderError { @@ -72,8 +56,6 @@ std::error_code make_dynamic_error_code(const Twine &msg); } // end namespace lld namespace std { -template <> -struct is_error_code_enum<lld::NativeReaderError> : std::true_type {}; template <> struct is_error_code_enum<lld::YamlReaderError> : std::true_type {}; template <> struct is_error_code_enum<lld::LinkerScriptReaderError> : std::true_type {}; diff --git a/lld/include/lld/Core/LinkingContext.h b/lld/include/lld/Core/LinkingContext.h index 3d451b6804c..bedf7d8e4a7 100644 --- a/lld/include/lld/Core/LinkingContext.h +++ b/lld/include/lld/Core/LinkingContext.h @@ -41,7 +41,6 @@ public: enum class OutputFileType : uint8_t { Default, // The default output type for this target YAML, // The output type is set to YAML - Native // The output file format is Native (Atoms) }; virtual ~LinkingContext(); @@ -273,13 +272,11 @@ public: /// Set the various output file types that the linker would /// create bool setOutputFileType(StringRef outputFileType) { - if (outputFileType.equals_lower("yaml")) + if (outputFileType.equals_lower("yaml")) { _outputFileType = OutputFileType::YAML; - else if (outputFileType.equals_lower("native")) - _outputFileType = OutputFileType::YAML; - else - return false; - return true; + return true; + } + return false; } /// Returns the output file type that that the linker needs to create. diff --git a/lld/include/lld/Core/Reader.h b/lld/include/lld/Core/Reader.h index 1868dea04e7..d4af3ab4eda 100644 --- a/lld/include/lld/Core/Reader.h +++ b/lld/include/lld/Core/Reader.h @@ -36,7 +36,7 @@ class MachOLinkingContext; /// \brief An abstract class for reading object files, library files, and /// executable files. /// -/// Each file format (e.g. ELF, mach-o, PECOFF, native, etc) have a concrete +/// Each file format (e.g. ELF, mach-o, PECOFF, etc) have a concrete /// subclass of Reader. class Reader { public: @@ -115,7 +115,6 @@ public: // as parameters to the addSupport*() method. void addSupportArchives(bool logLoading); void addSupportYamlFiles(); - void addSupportNativeObjects(); void addSupportCOFFObjects(PECOFFLinkingContext &); void addSupportCOFFImportLibraries(PECOFFLinkingContext &); void addSupportMachOObjects(MachOLinkingContext &); diff --git a/lld/include/lld/Core/TODO.txt b/lld/include/lld/Core/TODO.txt index 8888c763ef6..8b523045de7 100644 --- a/lld/include/lld/Core/TODO.txt +++ b/lld/include/lld/Core/TODO.txt @@ -1,7 +1,7 @@ include/lld/Core ~~~~~~~~~~~~~~~~ -* The native/yaml reader/writer interfaces should be changed to return +* The yaml reader/writer interfaces should be changed to return an explanatory string if there is an error. The existing error_code abstraction only works for returning low level OS errors. It does not work for describing formatting issues. diff --git a/lld/include/lld/Core/Writer.h b/lld/include/lld/Core/Writer.h index cda348ebd2e..8214ed6203f 100644 --- a/lld/include/lld/Core/Writer.h +++ b/lld/include/lld/Core/Writer.h @@ -23,7 +23,7 @@ class PECOFFLinkingContext; /// \brief The Writer is an abstract class for writing object files, shared /// library files, and executable files. Each file format (e.g. ELF, mach-o, -/// PECOFF, native, etc) have a concrete subclass of Writer. +/// PECOFF, etc) have a concrete subclass of Writer. class Writer { public: virtual ~Writer(); @@ -44,7 +44,6 @@ protected: std::unique_ptr<Writer> createWriterELF(const ELFLinkingContext &); std::unique_ptr<Writer> createWriterMachO(const MachOLinkingContext &); std::unique_ptr<Writer> createWriterPECOFF(const PECOFFLinkingContext &); -std::unique_ptr<Writer> createWriterNative(); std::unique_ptr<Writer> createWriterYAML(const LinkingContext &); } // end namespace lld |

