[lld] r234474 - [ARM] clang-format ARM sources
Denis Protivensky
dprotivensky at accesssoftek.com
Thu Apr 9 03:17:22 PDT 2015
Author: denis-protivensky
Date: Thu Apr 9 05:17:22 2015
New Revision: 234474
URL: http://llvm.org/viewvc/llvm-project?rev=234474&view=rev
Log:
[ARM] clang-format ARM sources
Modified:
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h?rev=234474&r1=234473&r2=234474&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h Thu Apr 9 05:17:22 2015
@@ -24,9 +24,7 @@ public:
ARMELFMappingAtom(T&&... args)
: ELFDefinedAtom<ELFT>(std::forward<T>(args)...) {}
- DefinedAtom::CodeModel codeModel() const override {
- return Model;
- }
+ DefinedAtom::CodeModel codeModel() const override { return Model; }
};
template <class ELFT> class ARMELFDefinedAtom : public ELFDefinedAtom<ELFT> {
@@ -36,9 +34,9 @@ public:
: ELFDefinedAtom<ELFT>(std::forward<T>(args)...) {}
bool isThumbFunc() const {
- const auto* symbol = this->_symbol;
+ const auto *symbol = this->_symbol;
return symbol->getType() == llvm::ELF::STT_FUNC &&
- (static_cast<uint64_t>(symbol->st_value) & 0x1);
+ (static_cast<uint64_t>(symbol->st_value) & 0x1);
}
/// Correct st_value for symbols addressing Thumb instructions
@@ -63,9 +61,8 @@ public:
protected:
/// Returns initial addend; for ARM it is 0, because it is read
/// during the relocations applying
- Reference::Addend getInitialAddend(ArrayRef<uint8_t>,
- uint64_t,
- const Elf_Rel&) const override {
+ Reference::Addend getInitialAddend(ArrayRef<uint8_t>, uint64_t,
+ const Elf_Rel &) const override {
return 0;
}
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h?rev=234474&r1=234473&r2=234474&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h Thu Apr 9 05:17:22 2015
@@ -76,7 +76,7 @@ void ARMExecutableWriter<ELFT>::finalize
template <class ELFT>
unique_bump_ptr<SymbolTable<ELFT>>
- ARMExecutableWriter<ELFT>::createSymbolTable() {
+ARMExecutableWriter<ELFT>::createSymbolTable() {
return unique_bump_ptr<SymbolTable<ELFT>>(
new (this->_alloc) ARMSymbolTable<ELFT>(this->_ctx));
}
@@ -110,11 +110,11 @@ std::error_code ARMExecutableWriter<ELFT
llvm::report_fatal_error(
"Two least bits must be zero for ARM entry point");
}
- break;
+ break;
case DefinedAtom::codeARMThumb:
// Fixup entry point for Thumb code.
this->_elfHeader->e_entry(al->_virtualAddr | 0x1);
- break;
+ break;
default:
llvm_unreachable("Wrong code model of entry point atom");
}
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp?rev=234474&r1=234473&r2=234474&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp Thu Apr 9 05:17:22 2015
@@ -164,7 +164,7 @@ static void relocR_ARM_REL32(uint8_t *lo
/// \brief R_ARM_PREL31 - ((S + A) | T) - P
static void relocR_ARM_PREL31(uint8_t *location, uint64_t P, uint64_t S,
- int64_t A, bool addressesThumb) {
+ int64_t A, bool addressesThumb) {
uint64_t T = addressesThumb;
uint32_t result = (uint32_t)(((S + A) | T) - P);
const uint32_t mask = 0x7FFFFFFF;
@@ -250,7 +250,7 @@ static void relocR_ARM_THM_JUMP11(uint8_
llvm::dbgs() << " P: 0x" << Twine::utohexstr(P);
llvm::dbgs() << " result: 0x" << Twine::utohexstr(result) << "\n");
- //we cut off first bit because it is always 1 according to p. 4.5.3
+ // we cut off first bit because it is always 1 according to p. 4.5.3
result = (result & 0x0FFE) >> 1;
applyThumb16Reloc(location, result, 0x7FF);
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h?rev=234474&r1=234473&r2=234474&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h Thu Apr 9 05:17:22 2015
@@ -19,8 +19,7 @@ typedef llvm::object::ELFType<llvm::supp
template <class ELFT> class ARMTargetLayout;
-class ARMTargetRelocationHandler final
- : public TargetRelocationHandler {
+class ARMTargetRelocationHandler final : public TargetRelocationHandler {
public:
ARMTargetRelocationHandler(ARMTargetLayout<ARMELFType> &layout)
: _armLayout(layout) {}
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp?rev=234474&r1=234473&r2=234474&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp Thu Apr 9 05:17:22 2015
@@ -97,9 +97,7 @@ public:
StringRef customSectionName() const override { return _section; }
- ContentType contentType() const override {
- return DefinedAtom::typeCode;
- }
+ ContentType contentType() const override { return DefinedAtom::typeCode; }
uint64_t size() const override { return rawContent().size(); }
@@ -206,8 +204,7 @@ public:
/// Serves as a mapping symbol in the release mode.
class ARMPLTAtom : public PLTAtom {
public:
- ARMPLTAtom(const File &f, const std::string &name)
- : PLTAtom(f, ".plt") {
+ ARMPLTAtom(const File &f, const std::string &name) : PLTAtom(f, ".plt") {
#ifndef NDEBUG
_name = name;
#else
@@ -375,8 +372,8 @@ protected:
std::error_code handleTLSIE32(const Reference &ref) {
if (const auto *target = dyn_cast<DefinedAtom>(ref.target())) {
- const_cast<Reference &>(ref).setTarget(
- static_cast<Derived *>(this)->getTLSTPOFF32(target));
+ const_cast<Reference &>(ref)
+ .setTarget(static_cast<Derived *>(this)->getTLSTPOFF32(target));
return std::error_code();
}
llvm_unreachable("R_ARM_TLS_IE32 reloc targets wrong atom type");
@@ -499,8 +496,8 @@ protected:
std::error_code handleIFUNC(const DefinedAtom &atom, const Reference &ref) {
auto target = dyn_cast<const DefinedAtom>(ref.target());
if (target && target->contentType() == DefinedAtom::typeResolver) {
- const_cast<Reference &>(ref).setTarget(
- getIFUNCPLTEntry(target, isThumbCode(atom.codeModel())));
+ const_cast<Reference &>(ref)
+ .setTarget(getIFUNCPLTEntry(target, isThumbCode(atom.codeModel())));
}
return std::error_code();
}
@@ -672,7 +669,8 @@ public:
name += da->name();
name += "_from_arm";
// Create parts of veneer with mapping symbols.
- auto v_a = new (_file._alloc) Veneer_ARM_B_BL_Static_a_Atom(_file, secName, name);
+ auto v_a =
+ new (_file._alloc) Veneer_ARM_B_BL_Static_a_Atom(_file, secName, name);
addVeneerWithMapping<DefinedAtom::codeARM_a>(da, v_a, name);
auto v_d = new (_file._alloc) Veneer_ARM_B_BL_Static_d_Atom(_file, secName);
addVeneerWithMapping<DefinedAtom::codeARM_d>(v_a, v_d, name);
@@ -695,7 +693,8 @@ public:
name += da->name();
name += "_from_thumb";
// Create parts of veneer with mapping symbols.
- auto v_t = new (_file._alloc) Veneer_THM_B_BL_Static_t_Atom(_file, secName, name);
+ auto v_t =
+ new (_file._alloc) Veneer_THM_B_BL_Static_t_Atom(_file, secName, name);
addVeneerWithMapping<DefinedAtom::codeARM_t>(da, v_t, name);
auto v_a = new (_file._alloc) Veneer_THM_B_BL_Static_a_Atom(_file, secName);
addVeneerWithMapping<DefinedAtom::codeARM_a>(v_t, v_a, name);
More information about the llvm-commits
mailing list