[lld] r197214 - Run clang-format on the new files.
Rui Ueyama
ruiu at google.com
Thu Dec 12 23:37:52 PST 2013
Author: ruiu
Date: Fri Dec 13 01:37:52 2013
New Revision: 197214
URL: http://llvm.org/viewvc/llvm-project?rev=197214&view=rev
Log:
Run clang-format on the new files.
I should have run it before submitting but forgot to do that. Doing it now...
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.cpp
lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h
Modified: lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.cpp?rev=197214&r1=197213&r2=197214&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.cpp Fri Dec 13 01:37:52 2013
@@ -24,9 +24,8 @@ using llvm::object::export_directory_tab
namespace lld {
namespace pecoff {
-static bool
-getExportedAtoms(const PECOFFLinkingContext &ctx, MutableFile *file,
- std::vector<const DefinedAtom *> &ret) {
+static bool getExportedAtoms(const PECOFFLinkingContext &ctx, MutableFile *file,
+ std::vector<const DefinedAtom *> &ret) {
std::map<StringRef, const DefinedAtom *> definedAtoms;
for (const DefinedAtom *atom : file->defined())
definedAtoms[atom->name()] = atom;
@@ -50,8 +49,8 @@ static bool compare(const DefinedAtom *a
edata::EdataAtom *
EdataPass::createAddressTable(const std::vector<const DefinedAtom *> &atoms) {
- EdataAtom *addressTable = new (_alloc) EdataAtom(
- _file, sizeof(export_address_table_entry) * atoms.size());
+ EdataAtom *addressTable = new (_alloc)
+ EdataAtom(_file, sizeof(export_address_table_entry) * atoms.size());
size_t offset = 0;
for (const DefinedAtom *atom : atoms) {
@@ -64,7 +63,8 @@ EdataPass::createAddressTable(const std:
edata::EdataAtom *
EdataPass::createNamePointerTable(const std::vector<const DefinedAtom *> &atoms,
MutableFile *file) {
- EdataAtom *table = new (_alloc) EdataAtom(_file, sizeof(uint32_t) * atoms.size());
+ EdataAtom *table =
+ new (_alloc) EdataAtom(_file, sizeof(uint32_t) * atoms.size());
size_t offset = 0;
for (const DefinedAtom *atom : atoms) {
@@ -78,7 +78,8 @@ EdataPass::createNamePointerTable(const
}
edata::EdataAtom *EdataPass::createExportDirectoryTable(size_t numEntries) {
- EdataAtom *ret = new (_alloc) EdataAtom(_file, sizeof(export_directory_table_entry));
+ EdataAtom *ret =
+ new (_alloc) EdataAtom(_file, sizeof(export_directory_table_entry));
auto *data = ret->getContents<export_directory_table_entry>();
data->TimeDateStamp = time(nullptr);
data->OrdinalBase = 1;
@@ -87,10 +88,11 @@ edata::EdataAtom *EdataPass::createExpor
return ret;
}
-edata::EdataAtom *
-EdataPass::createOrdinalTable(const std::vector<const DefinedAtom *> &atoms,
- const std::vector<const DefinedAtom *> &sortedAtoms) {
- EdataAtom *ret = new (_alloc) EdataAtom(_file, sizeof(uint16_t) * atoms.size());
+edata::EdataAtom *EdataPass::createOrdinalTable(
+ const std::vector<const DefinedAtom *> &atoms,
+ const std::vector<const DefinedAtom *> &sortedAtoms) {
+ EdataAtom *ret =
+ new (_alloc) EdataAtom(_file, sizeof(uint16_t) * atoms.size());
uint16_t *data = ret->getContents<uint16_t>();
std::map<const DefinedAtom *, size_t> ordinals;
@@ -118,12 +120,13 @@ void EdataPass::perform(std::unique_ptr<
new (_alloc) COFFStringAtom(_file, _stringOrdinal++, ".edata",
llvm::sys::path::filename(_ctx.outputPath()));
file->addAtom(*dllName);
- addDir32NBReloc(table, dllName, offsetof(export_directory_table_entry, NameRVA));
+ addDir32NBReloc(table, dllName,
+ offsetof(export_directory_table_entry, NameRVA));
EdataAtom *addressTable = createAddressTable(atoms);
file->addAtom(*addressTable);
- addDir32NBReloc(table, addressTable,
- offsetof(export_directory_table_entry, ExportAddressTableRVA));
+ addDir32NBReloc(table, addressTable, offsetof(export_directory_table_entry,
+ ExportAddressTableRVA));
std::vector<const DefinedAtom *> sortedAtoms(atoms);
std::sort(sortedAtoms.begin(), sortedAtoms.end(), compare);
Modified: lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h?rev=197214&r1=197213&r2=197214&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/EdataPass.h Fri Dec 13 01:37:52 2013
@@ -39,15 +39,15 @@ namespace edata {
class EdataAtom : public COFFLinkerInternalAtom {
public:
EdataAtom(VirtualFile &file, size_t size)
- : COFFLinkerInternalAtom(file, file.getNextOrdinal(),
- std::vector<uint8_t>(size)) {}
+ : COFFLinkerInternalAtom(file, file.getNextOrdinal(),
+ std::vector<uint8_t>(size)) {}
virtual SectionChoice sectionChoice() const { return sectionCustomRequired; }
virtual StringRef customSectionName() const { return ".edata"; }
virtual ContentType contentType() const { return typeData; }
virtual ContentPermissions permissions() const { return permR__; }
- template<typename T> T *getContents() const {
+ template <typename T> T *getContents() const {
return (T *)rawContent().data();
}
};
@@ -63,14 +63,14 @@ public:
private:
edata::EdataAtom *createExportDirectoryTable(size_t numEntries);
- edata::EdataAtom *createAddressTable(
- const std::vector<const DefinedAtom *> &atoms);
+ edata::EdataAtom *
+ createAddressTable(const std::vector<const DefinedAtom *> &atoms);
edata::EdataAtom *
createNamePointerTable(const std::vector<const DefinedAtom *> &atoms,
MutableFile *file);
- edata::EdataAtom *createOrdinalTable(
- const std::vector<const DefinedAtom *> &atoms,
- const std::vector<const DefinedAtom *> &sortedAtoms);
+ edata::EdataAtom *
+ createOrdinalTable(const std::vector<const DefinedAtom *> &atoms,
+ const std::vector<const DefinedAtom *> &sortedAtoms);
const PECOFFLinkingContext &_ctx;
VirtualFile _file;
More information about the llvm-commits
mailing list