[lld] r173822 - [ELF] Fix header sort order.

Michael J. Spencer bigcheesegs at gmail.com
Tue Jan 29 11:53:41 PST 2013


Author: mspencer
Date: Tue Jan 29 13:53:41 2013
New Revision: 173822

URL: http://llvm.org/viewvc/llvm-project?rev=173822&view=rev
Log:
[ELF] Fix header sort order.

Added:
    lld/trunk/lib/ReaderWriter/ELF/ELFTargetLayout.h
Modified:
    lld/trunk/lib/ReaderWriter/ELF/AtomsELF.h
    lld/trunk/lib/ReaderWriter/ELF/DefaultELFLayout.h
    lld/trunk/lib/ReaderWriter/ELF/DefaultELFTargetHandler.h
    lld/trunk/lib/ReaderWriter/ELF/ELFChunk.h
    lld/trunk/lib/ReaderWriter/ELF/ELFHeaderChunks.h
    lld/trunk/lib/ReaderWriter/ELF/ELFLayout.h
    lld/trunk/lib/ReaderWriter/ELF/ELFSectionChunks.h
    lld/trunk/lib/ReaderWriter/ELF/ELFSegmentChunks.h
    lld/trunk/lib/ReaderWriter/ELF/ELFTargetHandler.h
    lld/trunk/lib/ReaderWriter/ELF/ELFTargetInfo.cpp
    lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h
    lld/trunk/lib/ReaderWriter/ELF/ELFWriter.h
    lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h
    lld/trunk/lib/ReaderWriter/ELF/FileELF.h
    lld/trunk/lib/ReaderWriter/ELF/HexagonReference.cpp
    lld/trunk/lib/ReaderWriter/ELF/PPCReference.cpp
    lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp
    lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.cpp
    lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.h
    lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
    lld/trunk/lib/ReaderWriter/ELF/X86Reference.cpp
    lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTarget.h
    lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTargetInfo.h

Modified: lld/trunk/lib/ReaderWriter/ELF/AtomsELF.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AtomsELF.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AtomsELF.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/AtomsELF.h Tue Jan 29 13:53:41 2013
@@ -1,9 +1,21 @@
-#ifndef LLD_ELFATOMS_H
-#define LLD_ELFATOMS_H
+//===- lib/ReaderWriter/ELF/AtomELF.h -------------------------------------===//
+//
+//                             The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_READER_WRITER_ELF_ATOMS_ELF_H
+#define LLD_READER_WRITER_ELF_ATOMS_ELF_H
 
-#include "lld/Core/LLVM.h"
 #include "ELFTargetHandler.h"
 
+#include "lld/Core/LLVM.h"
+
+#include "llvm/ADT/ArrayRef.h"
+
 #include <memory>
 #include <vector>
 

Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultELFLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultELFLayout.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DefaultELFLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultELFLayout.h Tue Jan 29 13:53:41 2013
@@ -10,6 +10,12 @@
 #ifndef LLD_READER_WRITER_DEFAULT_ELF_LAYOUT_H_
 #define LLD_READER_WRITER_DEFAULT_ELF_LAYOUT_H_
 
+#include "ELFChunk.h"
+#include "ELFHeaderChunks.h"
+#include "ELFLayout.h"
+#include "ELFSectionChunks.h"
+#include "ELFSegmentChunks.h"
+
 #include "lld/Core/LinkerOptions.h"
 
 #include "llvm/ADT/ArrayRef.h"
@@ -22,15 +28,9 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
 
-#include "ELFChunk.h"
-#include "ELFHeaderChunks.h"
-#include "ELFLayout.h"
-#include "ELFSectionChunks.h"
-#include "ELFSegmentChunks.h"
-
 #include <map>
-#include <unordered_map>
 #include <tuple>
+#include <unordered_map>
 
 /// \brief The DefaultELFLayout class is used by the Writer to arrange
 ///        sections and segments in the order determined by the target ELF

Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultELFTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultELFTargetHandler.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DefaultELFTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultELFTargetHandler.h Tue Jan 29 13:53:41 2013
@@ -9,16 +9,15 @@
 #ifndef LLD_READER_WRITER_DEFAULT_ELF_TARGETHANDLER_H
 #define LLD_READER_WRITER_DEFAULT_ELF_TARGETHANDLER_H
 
-#include "lld/ReaderWriter/ELFTargetInfo.h"
+#include "DefaultELFLayout.h"
+#include "ELFTargetHandler.h"
 
 #include "lld/Core/LinkerOptions.h"
+#include "lld/ReaderWriter/ELFTargetInfo.h"
 
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/ELF.h"
 
-#include "DefaultELFLayout.h"
-#include "ELFTargetHandler.h"
-
 namespace lld {
 namespace elf {
 

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFChunk.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFChunk.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFChunk.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFChunk.h Tue Jan 29 13:53:41 2013
@@ -20,8 +20,9 @@
 #include "llvm/Support/FileOutputBuffer.h"
 
 namespace lld {
-namespace elf {  
+class ELFTargetInfo;
 
+namespace elf {
 class ELFWriter;
 
 /// \brief A chunk is a contiguous region of space

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFHeaderChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFHeaderChunks.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFHeaderChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFHeaderChunks.h Tue Jan 29 13:53:41 2013
@@ -10,16 +10,15 @@
 #ifndef LLD_READER_WRITER_ELF_HEADER_CHUNKS_H_
 #define LLD_READER_WRITER_ELF_HEADER_CHUNKS_H_
 
-#include "llvm/Object/ELF.h"
+#include "ELFSegmentChunks.h"
 
+#include "llvm/Object/ELF.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileOutputBuffer.h"
 
-#include "ELFSegmentChunks.h"
-
 /// \brief An ELFHeader represents the Elf[32/64]_Ehdr structure at the
 ///        start of an ELF executable file.
 namespace lld {

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLayout.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFLayout.h Tue Jan 29 13:53:41 2013
@@ -13,9 +13,7 @@
 #include "lld/Core/DefinedAtom.h"
 
 #include "llvm/ADT/StringRef.h"
-
 #include "llvm/Object/ELF.h"
-
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ELF.h"

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFSectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFSectionChunks.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFSectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFSectionChunks.h Tue Jan 29 13:53:41 2013
@@ -10,25 +10,24 @@
 #ifndef LLD_READER_WRITER_ELF_SECTION_CHUNKS_H_
 #define LLD_READER_WRITER_ELF_SECTION_CHUNKS_H_
 
+#include "ELFChunk.h"
+#include "ELFLayout.h"
+#include "ELFTargetHandler.h"
+#include "ELFWriter.h"
+
 #include "lld/Core/DefinedAtom.h"
 #include "lld/Core/range.h"
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/StringRef.h"
-
 #include "llvm/Object/ELF.h"
-
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileOutputBuffer.h"
 
-#include "ELFChunk.h"
-#include "ELFLayout.h"
-#include "ELFWriter.h"
-
 namespace lld {
 namespace elf {
 

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFSegmentChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFSegmentChunks.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFSegmentChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFSegmentChunks.h Tue Jan 29 13:53:41 2013
@@ -10,26 +10,24 @@
 #ifndef LLD_READER_WRITER_ELF_SEGMENT_CHUNKS_H_
 #define LLD_READER_WRITER_ELF_SEGMENT_CHUNKS_H_
 
+#include "ELFChunk.h"
+#include "ELFLayout.h"
+#include "ELFSectionChunks.h"
+#include "ELFWriter.h"
+
 #include "lld/Core/range.h"
 #include "lld/ReaderWriter/Writer.h"
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/StringRef.h"
-
 #include "llvm/Object/ELF.h"
-
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileOutputBuffer.h"
 
-#include "ELFChunk.h"
-#include "ELFLayout.h"
-#include "ELFSectionChunks.h"
-#include "ELFWriter.h"
-
 /// \brief A segment can be divided into segment slices
 ///        depending on how the segments can be split
 namespace lld {

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFTargetHandler.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFTargetHandler.h Tue Jan 29 13:53:41 2013
@@ -16,12 +16,13 @@
 #ifndef LLD_READER_WRITER_ELF_TARGETHANDLER_H
 #define LLD_READER_WRITER_ELF_TARGETHANDLER_H
 
+#include "lld/Core/InputFiles.h"
 #include "lld/Core/LinkerOptions.h"
 #include "lld/Core/LLVM.h"
 #include "lld/Core/TargetInfo.h"
 #include "lld/ReaderWriter/ELFTargetInfo.h"
-#include "DefaultELFLayout.h"
-#include "AtomsELF.h"
+
+#include "llvm/ADT/Hashing.h"
 
 #include <memory>
 #include <vector>
@@ -30,6 +31,10 @@
 namespace lld {
 template <class ELFT> class ELFDefinedAtom;
 namespace elf {
+template <class ELFT> class ELFTargetLayout;
+template <class ELFT> class ELFHeader;
+template <class ELFT> class Section;
+
 /// \brief The target registers a set of handlers for overriding target specific
 /// attributes for a DefinedAtom. The Reader uses this class to query for the
 /// type of atom and its permissions 
@@ -52,52 +57,6 @@ public:
   }
 };
 
-/// \brief The target can override certain functions in the DefaultELFLayout
-/// class so that the order, the name of the section and the segment type could
-/// be changed in the final layout
-template <class ELFT> class ELFTargetLayout : public DefaultELFLayout<ELFT> {
-public:
-  ELFTargetLayout(ELFTargetInfo &targetInfo, DefaultELFLayout<ELFT> &layout)
-      : _targetInfo(targetInfo), _layout(layout) {
-  }
-
-  /// isTargetSection provides a way to determine if the section that
-  /// we are processing has been registered by the target and the target
-  /// wants to handle them. 
-  /// For example: the Writer may be processing a section but the target
-  /// might want to override the functionality on how atoms are inserted
-  /// into the section. Such sections are set the K_TargetSection flag in
-  /// the SectionKind after they are created
-  virtual bool isTargetSection(const StringRef name, const int32_t contentType,
-                               const int32_t contentPermissions) = 0;
-
-  /// The target may want to override the sectionName to a different
-  /// section Name in the output
-  virtual StringRef sectionName(const StringRef name, const int32_t contentType,
-                                const int32_t contentPermissions) = 0;
-
-  /// The target may want to override the section order that has been 
-  /// set by the DefaultLayout
-  virtual ELFLayout::SectionOrder getSectionOrder(
-      const StringRef name, int32_t contentType,
-      int32_t contentPermissions) = 0;
-
-  /// The target can set the segment type for a Section
-  virtual ELFLayout::SegmentType segmentType(Section<ELFT> *section) const = 0;
-
-  /// Returns true/false depending on whether the section has a Output
-  //  segment or not
-  bool hasOutputSegment(Section<ELFT> *section) = 0;
-
-  /// Returns the target Section for a section name and content Type
-  Section<ELFT> *getSection(const StringRef name,
-                            DefinedAtom::ContentPermissions permissions) = 0;
-
-private:
-  const ELFTargetInfo &_targetInfo;
-  const DefaultELFLayout<ELFT> &_layout;
-};
-
 /// \brief An interface to override functions that are provided by the 
 /// the default ELF Layout
 template <class ELFT> class ELFTargetHandler : public ELFTargetHandlerBase {

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFTargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFTargetInfo.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFTargetInfo.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFTargetInfo.cpp Tue Jan 29 13:53:41 2013
@@ -9,14 +9,14 @@
 
 #include "lld/ReaderWriter/ELFTargetInfo.h"
 
+#include "ELFTargetHandler.h"
+#include "ELFTargets.h"
+
 #include "lld/Core/LinkerOptions.h"
 
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/ELF.h"
 
-#include "ELFTargetHandler.h"
-#include "ELFTargets.h"
-
 namespace lld {
 uint16_t ELFTargetInfo::getOutputType() const {
   switch (_options._outputKind) {

Added: lld/trunk/lib/ReaderWriter/ELF/ELFTargetLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFTargetLayout.h?rev=173822&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFTargetLayout.h (added)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFTargetLayout.h Tue Jan 29 13:53:41 2013
@@ -0,0 +1,67 @@
+//===- lib/ReaderWriter/ELF/ELFTargetLayout.h -----------------------------===//
+//
+//                             The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_READER_WRITER_ELF_TARGET_LAYOUT_H
+#define LLD_READER_WRITER_ELF_TARGET_LAYOUT_H
+
+#include "DefaultELFLayout.h"
+
+#include "lld/Core/LLVM.h"
+
+namespace lld {
+namespace elf {
+/// \brief The target can override certain functions in the DefaultELFLayout
+/// class so that the order, the name of the section and the segment type could
+/// be changed in the final layout
+template <class ELFT> class ELFTargetLayout : public DefaultELFLayout<ELFT> {
+public:
+  ELFTargetLayout(ELFTargetInfo &targetInfo, DefaultELFLayout<ELFT> &layout)
+      : _targetInfo(targetInfo), _layout(layout) {
+  }
+
+  /// isTargetSection provides a way to determine if the section that
+  /// we are processing has been registered by the target and the target
+  /// wants to handle them. 
+  /// For example: the Writer may be processing a section but the target
+  /// might want to override the functionality on how atoms are inserted
+  /// into the section. Such sections are set the K_TargetSection flag in
+  /// the SectionKind after they are created
+  virtual bool isTargetSection(const StringRef name, const int32_t contentType,
+                               const int32_t contentPermissions) = 0;
+
+  /// The target may want to override the sectionName to a different
+  /// section Name in the output
+  virtual StringRef sectionName(const StringRef name, const int32_t contentType,
+                                const int32_t contentPermissions) = 0;
+
+  /// The target may want to override the section order that has been 
+  /// set by the DefaultLayout
+  virtual ELFLayout::SectionOrder getSectionOrder(
+      const StringRef name, int32_t contentType,
+      int32_t contentPermissions) = 0;
+
+  /// The target can set the segment type for a Section
+  virtual ELFLayout::SegmentType segmentType(Section<ELFT> *section) const = 0;
+
+  /// Returns true/false depending on whether the section has a Output
+  //  segment or not
+  bool hasOutputSegment(Section<ELFT> *section) = 0;
+
+  /// Returns the target Section for a section name and content Type
+  Section<ELFT> *getSection(const StringRef name,
+                            DefinedAtom::ContentPermissions permissions) = 0;
+
+private:
+  const ELFTargetInfo &_targetInfo;
+  const DefaultELFLayout<ELFT> &_layout;
+};
+} // end namespace elf
+} // end namespace lld
+
+#endif

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h Tue Jan 29 13:53:41 2013
@@ -6,12 +6,13 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
+
 #ifndef LLD_READER_WRITER_ELF_TARGETS_H
 #define LLD_READER_WRITER_ELF_TARGETS_H
 
-#include "X86/X86ELFTarget.h"
-#include "X86_64/X86_64ELFTarget.h"
 #include "Hexagon/HexagonELFTarget.h"
 #include "PPC/PPCELFTarget.h"
+#include "X86/X86ELFTarget.h"
+#include "X86_64/X86_64ELFTarget.h"
 
 #endif

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFWriter.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFWriter.h Tue Jan 29 13:53:41 2013
@@ -10,10 +10,11 @@
 #ifndef LLD_READER_WRITER_ELF_WRITER_H_
 #define LLD_READER_WRITER_ELF_WRITER_H_
 
+#include "ReferenceKinds.h"
+
 #include "lld/Core/File.h"
 #include "lld/Core/InputFiles.h"
 #include "lld/ReaderWriter/Writer.h"
-#include "ReferenceKinds.h"
 
 namespace lld {
 namespace elf {

Modified: lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h Tue Jan 29 13:53:41 2013
@@ -10,13 +10,14 @@
 #ifndef LLD_READER_WRITER_ELF_EXECUTABLE_ATOM_H_
 #define LLD_READER_WRITER_ELF_EXECUTABLE_ATOM_H_
 
+#include "AtomsELF.h"
+#include "FileELF.h"
+
 #include "lld/Core/DefinedAtom.h"
 #include "lld/Core/File.h"
 #include "lld/Core/Reference.h"
 #include "lld/Core/UndefinedAtom.h"
 #include "lld/ReaderWriter/Writer.h"
-#include "AtomsELF.h"
-#include "FileELF.h"
 
 namespace lld {
 namespace elf {

Modified: lld/trunk/lib/ReaderWriter/ELF/FileELF.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/FileELF.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/FileELF.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/FileELF.h Tue Jan 29 13:53:41 2013
@@ -12,6 +12,8 @@
 #ifndef LLD_READER_WRITER_FILE_ELF_H
 #define LLD_READER_WRITER_FILE_ELF_H
 
+#include "AtomsELF.h"
+
 #include "lld/Core/Reference.h"
 #include "lld/ReaderWriter/ELFTargetInfo.h"
 #include "lld/ReaderWriter/ReaderArchive.h"
@@ -23,18 +25,18 @@
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Casting.h"
-#include "llvm/Support/ErrorOr.h"
-#include "llvm/Support/Path.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/ErrorOr.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Memory.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/system_error.h"
-#include "AtomsELF.h"
+
+#include <map>
 
 namespace lld {
 
@@ -322,10 +324,8 @@ private:
   /// relocations will also have a section named ".rel.text" or ".rela.text"
   /// which will hold the entries. -- .rel or .rela is prepended to create
   /// the SHT_REL(A) section name.
-  std::map<llvm::StringRef,
-           std::vector<const Elf_Rela *> > _relocationAddendRefences;
-  std::map<llvm::StringRef,
-           std::vector<const Elf_Rel *> > _relocationReferences;
+  std::map<StringRef, std::vector<const Elf_Rela *> > _relocationAddendRefences;
+  std::map<StringRef, std::vector<const Elf_Rel *> > _relocationReferences;
   std::vector<ELFReference<ELFT> *> _references;
   llvm::DenseMap<const Elf_Sym *, Atom *> _symbolToAtomMapping;
   llvm::BumpPtrAllocator _readerStorage;
@@ -333,4 +333,4 @@ private:
 };
 } // lld
 
-#endif // LLD_READER_WRITER_FILE_ELF_H
+#endif

Modified: lld/trunk/lib/ReaderWriter/ELF/HexagonReference.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/HexagonReference.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/HexagonReference.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/HexagonReference.cpp Tue Jan 29 13:53:41 2013
@@ -12,7 +12,6 @@
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
-
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ELF.h"

Modified: lld/trunk/lib/ReaderWriter/ELF/PPCReference.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPCReference.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPCReference.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPCReference.cpp Tue Jan 29 13:53:41 2013
@@ -12,7 +12,6 @@
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
-
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ELF.h"

Modified: lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp Tue Jan 29 13:53:41 2013
@@ -15,6 +15,9 @@
 
 #include "lld/ReaderWriter/Reader.h"
 
+#include "AtomsELF.h"
+#include "FileELF.h"
+
 #include "lld/Core/Reference.h"
 #include "lld/ReaderWriter/ELFTargetInfo.h"
 #include "lld/ReaderWriter/ReaderArchive.h"
@@ -26,19 +29,16 @@
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Casting.h"
-#include "llvm/Support/ErrorOr.h"
-#include "llvm/Support/Path.h"
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/ErrorOr.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Memory.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/system_error.h"
-#include "AtomsELF.h"
-#include "FileELF.h"
 
 #include <map>
 #include <vector>

Modified: lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.cpp Tue Jan 29 13:53:41 2013
@@ -12,9 +12,8 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/ADT/Triple.h"
-
-#include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ELF.h"
+#include "llvm/Support/ErrorHandling.h"
 
 namespace lld {
 namespace elf {

Modified: lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ReferenceKinds.h Tue Jan 29 13:53:41 2013
@@ -7,6 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLD_READER_WRITER_ELF_REFERENCE_KINDS_H
+#define LLD_READER_WRITER_ELF_REFERENCE_KINDS_H
+
 #include "lld/Core/LLVM.h"
 #include "lld/Core/Reference.h"
 #include "lld/ReaderWriter/Writer.h"
@@ -20,9 +23,6 @@
 #include <map>
 #include <memory>
 
-#ifndef LLD_READER_WRITER_ELF_REFERENCE_KINDS_H
-#define LLD_READER_WRITER_ELF_REFERENCE_KINDS_H
-
 namespace lld {
 namespace elf {
 /// \brief the abstract interface to Reference::Kind values for ELF files.

Modified: lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp Tue Jan 29 13:53:41 2013
@@ -7,11 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lld/ReaderWriter/ELFTargetInfo.h"
+#include "lld/ReaderWriter/Writer.h"
 
 #include "DefaultELFLayout.h"
 #include "ExecutableAtoms.h"
 
+#include "lld/ReaderWriter/ELFTargetInfo.h"
+
 using namespace llvm;
 using namespace llvm::object;
 namespace lld {

Modified: lld/trunk/lib/ReaderWriter/ELF/X86Reference.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86Reference.cpp?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86Reference.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86Reference.cpp Tue Jan 29 13:53:41 2013
@@ -22,7 +22,6 @@
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
-
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorHandling.h"

Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTarget.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTarget.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTarget.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTarget.h Tue Jan 29 13:53:41 2013
@@ -6,4 +6,5 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
+
 #include "X86_64ELFTargetInfo.h"

Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTargetInfo.h?rev=173822&r1=173821&r2=173822&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTargetInfo.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64ELFTargetInfo.h Tue Jan 29 13:53:41 2013
@@ -10,14 +10,14 @@
 #ifndef LLD_READER_WRITER_ELF_X86_64_TARGETINFO_H
 #define LLD_READER_WRITER_ELF_X86_64_TARGETINFO_H
 
-#include "lld/ReaderWriter/ELFTargetInfo.h"
+#include "DefaultELFTargetHandler.h"
 
 #include "lld/Core/LinkerOptions.h"
+#include "lld/ReaderWriter/ELFTargetInfo.h"
+
 #include "llvm/Object/ELF.h"
 #include "llvm/Support/ELF.h"
 
-#include "DefaultELFTargetHandler.h"
-
 namespace lld {
 namespace elf {
 class X86_64ELFTargetInfo LLVM_FINAL : public ELFTargetInfo {





More information about the llvm-commits mailing list