diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-03-31 19:33:25 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-03-31 19:33:25 +0000 |
| commit | efaf6a77d145f47251096a482fee60e7ec5fde2d (patch) | |
| tree | c1825e1c9933e58391d9dd66ef56f38901ead69e | |
| parent | 050527b4ac63e378697191e494f8f96638b534df (diff) | |
| download | bcm5719-llvm-efaf6a77d145f47251096a482fee60e7ec5fde2d.tar.gz bcm5719-llvm-efaf6a77d145f47251096a482fee60e7ec5fde2d.zip | |
Rename identifiers starting with an underscore and a uppercase letter.
Identifiers starting with _[A-Z] is reserved for the language.
User programs shouldn't use such identifiers.
llvm-svn: 233737
3 files changed, 37 insertions, 37 deletions
diff --git a/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp b/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp index 0bd12958b27..eadeeb43848 100644 --- a/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp +++ b/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp @@ -245,7 +245,7 @@ protected: public: AArch64RelocationPass(const ELFLinkingContext &ctx) - : _file(ctx), _ctx(ctx), _null(nullptr), _PLT0(nullptr), _got0(nullptr), + : _file(ctx), _ctx(ctx), _null(nullptr), _plt0(nullptr), _got0(nullptr), _got1(nullptr) {} /// \brief Do the pass. @@ -289,9 +289,9 @@ public: // Add all created atoms to the link. uint64_t ordinal = 0; - if (_PLT0) { - _PLT0->setOrdinal(ordinal++); - mf->addAtom(*_PLT0); + if (_plt0) { + _plt0->setOrdinal(ordinal++); + mf->addAtom(*_plt0); } for (auto &plt : _pltVector) { plt->setOrdinal(ordinal++); @@ -301,7 +301,7 @@ public: _null->setOrdinal(ordinal++); mf->addAtom(*_null); } - if (_PLT0) { + if (_plt0) { _got0->setOrdinal(ordinal++); _got1->setOrdinal(ordinal++); mf->addAtom(*_got0); @@ -342,7 +342,7 @@ protected: /// \brief The got and plt entries for .PLT0. This is used to call into the /// dynamic linker for symbol resolution. /// @{ - PLT0Atom *_PLT0; + PLT0Atom *_plt0; GOTAtom *_got0; GOTAtom *_got1; /// @} @@ -394,22 +394,22 @@ public: : AArch64RelocationPass(ctx) {} const PLT0Atom *getPLT0() { - if (_PLT0) - return _PLT0; + if (_plt0) + return _plt0; // Fill in the null entry. getNullGOT(); - _PLT0 = new (_file._alloc) AArch64PLT0Atom(_file); + _plt0 = new (_file._alloc) AArch64PLT0Atom(_file); _got0 = new (_file._alloc) AArch64GOTAtom(_file, ".got.plt"); _got1 = new (_file._alloc) AArch64GOTAtom(_file, ".got.plt"); - _PLT0->addReferenceELF_AArch64(R_AARCH64_ADR_GOT_PAGE, 4, _got0, 0); - _PLT0->addReferenceELF_AArch64(R_AARCH64_LD64_GOT_LO12_NC, 8, _got1, 0); - _PLT0->addReferenceELF_AArch64(ADD_AARCH64_GOTRELINDEX, 12, _got1, 0); + _plt0->addReferenceELF_AArch64(R_AARCH64_ADR_GOT_PAGE, 4, _got0, 0); + _plt0->addReferenceELF_AArch64(R_AARCH64_LD64_GOT_LO12_NC, 8, _got1, 0); + _plt0->addReferenceELF_AArch64(ADD_AARCH64_GOTRELINDEX, 12, _got1, 0); #ifndef NDEBUG - _PLT0->_name = "__PLT0"; + _plt0->_name = "__PLT0"; _got0->_name = "__got0"; _got1->_name = "__got1"; #endif - return _PLT0; + return _plt0; } const PLTAtom *getPLTEntry(const Atom *a) { diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp index 35498ac5f23..0dfaa6d1fc0 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp @@ -164,7 +164,7 @@ protected: public: GOTPLTPass(const ELFLinkingContext &ctx) - : _file(ctx), _null(nullptr), _PLT0(nullptr), _got0(nullptr) {} + : _file(ctx), _null(nullptr), _plt0(nullptr), _got0(nullptr) {} /// \brief Do the pass. /// @@ -182,9 +182,9 @@ public: // Add all created atoms to the link. uint64_t ordinal = 0; - if (_PLT0) { - _PLT0->setOrdinal(ordinal++); - mf->addAtom(*_PLT0); + if (_plt0) { + _plt0->setOrdinal(ordinal++); + mf->addAtom(*_plt0); } for (auto &plt : _pltVector) { plt->setOrdinal(ordinal++); @@ -224,7 +224,7 @@ protected: /// \brief The got and plt entries for .PLT0. This is used to call into the /// dynamic linker for symbol resolution. /// @{ - PLT0Atom *_PLT0; + PLT0Atom *_plt0; GOTAtom *_got0; /// @} }; @@ -239,14 +239,14 @@ public: } const PLT0Atom *getPLT0() { - if (_PLT0) - return _PLT0; - _PLT0 = new (_file._alloc) HexagonPLT0Atom(_file); - _PLT0->addReferenceELF_Hexagon(R_HEX_B32_PCREL_X, 0, _got0, 0); - _PLT0->addReferenceELF_Hexagon(R_HEX_6_PCREL_X, 4, _got0, 4); + if (_plt0) + return _plt0; + _plt0 = new (_file._alloc) HexagonPLT0Atom(_file); + _plt0->addReferenceELF_Hexagon(R_HEX_B32_PCREL_X, 0, _got0, 0); + _plt0->addReferenceELF_Hexagon(R_HEX_6_PCREL_X, 4, _got0, 4); DEBUG_WITH_TYPE("PLT", llvm::dbgs() << "[ PLT0/GOT0 ] " << "Adding plt0/got0 \n"); - return _PLT0; + return _plt0; } const PLTAtom *getPLTEntry(const Atom *a) { diff --git a/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp b/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp index 0703927fd56..b01036664af 100644 --- a/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp +++ b/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp @@ -244,7 +244,7 @@ protected: public: RelocationPass(const ELFLinkingContext &ctx) - : _file(ctx), _ctx(ctx), _null(nullptr), _PLT0(nullptr), _got0(nullptr), + : _file(ctx), _ctx(ctx), _null(nullptr), _plt0(nullptr), _got0(nullptr), _got1(nullptr) {} /// \brief Do the pass. @@ -264,9 +264,9 @@ public: // Add all created atoms to the link. uint64_t ordinal = 0; - if (_PLT0) { - _PLT0->setOrdinal(ordinal++); - mf->addAtom(*_PLT0); + if (_plt0) { + _plt0->setOrdinal(ordinal++); + mf->addAtom(*_plt0); } for (auto &plt : _pltVector) { plt->setOrdinal(ordinal++); @@ -276,7 +276,7 @@ public: _null->setOrdinal(ordinal++); mf->addAtom(*_null); } - if (_PLT0) { + if (_plt0) { _got0->setOrdinal(ordinal++); _got1->setOrdinal(ordinal++); mf->addAtom(*_got0); @@ -327,7 +327,7 @@ protected: /// \brief The got and plt entries for .PLT0. This is used to call into the /// dynamic linker for symbol resolution. /// @{ - PLT0Atom *_PLT0; + PLT0Atom *_plt0; GOTAtom *_got0; GOTAtom *_got1; /// @} @@ -379,20 +379,20 @@ public: : RelocationPass(ctx) {} const PLT0Atom *getPLT0() { - if (_PLT0) - return _PLT0; + if (_plt0) + return _plt0; // Fill in the null entry. getNullGOT(); - _PLT0 = new (_file._alloc) X86_64PLT0Atom(_file); + _plt0 = new (_file._alloc) X86_64PLT0Atom(_file); _got0 = new (_file._alloc) X86_64GOTAtom(_file, ".got.plt"); _got1 = new (_file._alloc) X86_64GOTAtom(_file, ".got.plt"); - _PLT0->addReferenceELF_x86_64(R_X86_64_PC32, 2, _got0, -4); - _PLT0->addReferenceELF_x86_64(R_X86_64_PC32, 8, _got1, -4); + _plt0->addReferenceELF_x86_64(R_X86_64_PC32, 2, _got0, -4); + _plt0->addReferenceELF_x86_64(R_X86_64_PC32, 8, _got1, -4); #ifndef NDEBUG _got0->_name = "__got0"; _got1->_name = "__got1"; #endif - return _PLT0; + return _plt0; } const PLTAtom *getPLTEntry(const Atom *a) { |

