summaryrefslogtreecommitdiffstats
path: root/lld/include/lld
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-07 03:48:56 +0000
committerZachary Turner <zturner@google.com>2017-06-07 03:48:56 +0000
commit264b5d9e8817fce8c47d2b06aba2d9244e426794 (patch)
tree234a31fd342ebd5f14a17da05bc7c3ca92cf25f1 /lld/include/lld
parentb4b16556e348ef42e69aff3c9f4332afc8fae67b (diff)
downloadbcm5719-llvm-264b5d9e8817fce8c47d2b06aba2d9244e426794.tar.gz
bcm5719-llvm-264b5d9e8817fce8c47d2b06aba2d9244e426794.zip
Move Object format code to lib/BinaryFormat.
This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
Diffstat (limited to 'lld/include/lld')
-rw-r--r--lld/include/lld/Core/Reader.h5
-rw-r--r--lld/include/lld/ReaderWriter/MachOLinkingContext.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/lld/include/lld/Core/Reader.h b/lld/include/lld/Core/Reader.h
index 5105eb1aa2b..32d04249f37 100644
--- a/lld/include/lld/Core/Reader.h
+++ b/lld/include/lld/Core/Reader.h
@@ -13,14 +13,13 @@
#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include <memory>
#include <vector>
-using llvm::sys::fs::file_magic;
-
namespace llvm {
namespace yaml {
class IO;
@@ -45,7 +44,7 @@ public:
/// The method is called with:
/// 1) the file_magic enumeration returned by identify_magic()
/// 2) the whole file content buffer if the above is not enough.
- virtual bool canParse(file_magic magic, MemoryBufferRef mb) const = 0;
+ virtual bool canParse(llvm::file_magic magic, MemoryBufferRef mb) const = 0;
/// \brief Parse a supplied buffer (already filled with the contents of a
/// file) and create a File object.
diff --git a/lld/include/lld/ReaderWriter/MachOLinkingContext.h b/lld/include/lld/ReaderWriter/MachOLinkingContext.h
index a9e80f50b23..9eefa8c4d94 100644
--- a/lld/include/lld/ReaderWriter/MachOLinkingContext.h
+++ b/lld/include/lld/ReaderWriter/MachOLinkingContext.h
@@ -16,8 +16,8 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/MachO.h"
#include <set>
using llvm::MachO::HeaderFileType;
OpenPOWER on IntegriCloud