Replace the 'final' keyword with 'LLVM_FINAL' as GCC 4.6 doesn't support

the keyword.

If anyone cares deeply about the final optimizations with GCC, we might
want to add a version test to the LLVM definition, but I'm perfectly
happy with this just only firing under Clang and modern MSVC builds.

llvm-svn: 172898
This commit is contained in:
Chandler Carruth 2013-01-19 09:57:51 +00:00
parent 8b95c03fca
commit b5f3bd956c
3 changed files with 8 additions and 8 deletions

View File

@ -84,7 +84,7 @@ public:
};
}
class LDDriver final : public Driver {
class LDDriver LLVM_FINAL : public Driver {
public:
LDDriver(StringRef defaultTargetTriple) : Driver(defaultTargetTriple) {}

View File

@ -28,7 +28,7 @@
using namespace lld;
class X86LinuxTarget final : public Target {
class X86LinuxTarget LLVM_FINAL : public Target {
public:
X86LinuxTarget(const LinkerOptions &lo) : Target(lo), _woe(lo._entrySymbol) {
_readerELF.reset(createReaderELF(_roe, _roa));
@ -93,7 +93,7 @@ private:
std::unique_ptr<lld::Writer> _writer, _writerYAML;
};
class X86_64LinuxTarget final : public Target {
class X86_64LinuxTarget LLVM_FINAL : public Target {
public:
X86_64LinuxTarget(const LinkerOptions &lo)
: Target(lo), _woe(lo._entrySymbol) {
@ -159,7 +159,7 @@ private:
std::unique_ptr<lld::Writer> _writer, _writerYAML;
};
class HexagonTarget final : public Target {
class HexagonTarget LLVM_FINAL : public Target {
public:
HexagonTarget(const LinkerOptions &lo)
: Target(lo), _woe(lo._entrySymbol) {

View File

@ -9,7 +9,7 @@ namespace lld {
/// \brief Relocation References: Defined Atoms may contain references that will
/// need to be patched before the executable is written.
template<class ELFT>
class ELFReference final : public Reference {
class ELFReference LLVM_FINAL : public Reference {
typedef llvm::object::Elf_Rel_Impl<ELFT, false> Elf_Rel;
typedef llvm::object::Elf_Rel_Impl<ELFT, true> Elf_Rela;
public:
@ -72,7 +72,7 @@ private:
/// This atom has no content its address will be used by the writer to fixup
/// references that point to it.
template<class ELFT>
class ELFAbsoluteAtom final : public AbsoluteAtom {
class ELFAbsoluteAtom LLVM_FINAL : public AbsoluteAtom {
typedef llvm::object::Elf_Sym_Impl<ELFT> Elf_Sym;
public:
@ -117,7 +117,7 @@ private:
/// \brief ELFUndefinedAtom: These atoms store undefined symbols and are place
/// holders that will be replaced by defined atoms later in the linking process.
template<class ELFT>
class ELFUndefinedAtom final: public UndefinedAtom {
class ELFUndefinedAtom LLVM_FINAL : public UndefinedAtom {
typedef llvm::object::Elf_Sym_Impl<ELFT> Elf_Sym;
public:
@ -156,7 +156,7 @@ private:
/// \brief This atom stores defined symbols and will contain either data or
/// code.
template<class ELFT>
class ELFDefinedAtom final: public DefinedAtom {
class ELFDefinedAtom LLVM_FINAL : public DefinedAtom {
typedef llvm::object::Elf_Sym_Impl<ELFT> Elf_Sym;
typedef llvm::object::Elf_Shdr_Impl<ELFT> Elf_Shdr;