Files
clang-p2996/lld/lib/ReaderWriter/ELF/OrderPass.h
Rui Ueyama 3c45cffd68 Merge MutableFile with SimpleFile.
SimpleFile is the only derived class of MutableFile.
This patch reduces the height of class hierarchy by removing
MutableFile class.

llvm-svn: 234354
2015-04-07 20:43:38 +00:00

31 lines
810 B
C++

//===- lib/ReaderWriter/ELF/OrderPass.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_ORDER_PASS_H
#define LLD_READER_WRITER_ELF_ORDER_PASS_H
#include "lld/Core/Parallel.h"
#include <limits>
namespace lld {
namespace elf {
/// \brief This pass sorts atoms by file and atom ordinals.
class OrderPass : public Pass {
public:
void perform(std::unique_ptr<SimpleFile> &file) override {
parallel_sort(file->definedAtoms().begin(), file->definedAtoms().end(),
DefinedAtom::compareByPosition);
}
};
}
}
#endif