From 4eb03f049e5ab3bb914569591ca7655a084b5707 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 2 Mar 2014 08:08:51 +0000 Subject: [PATCH] Switch all uses of LLVM_FINAL to just use 'final', and remove the macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202618 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Compiler.h | 10 ---------- lib/Analysis/TargetTransformInfo.cpp | 2 +- lib/CodeGen/BasicTargetTransformInfo.cpp | 2 +- lib/Target/AArch64/AArch64TargetTransformInfo.cpp | 2 +- lib/Target/ARM/ARMTargetTransformInfo.cpp | 2 +- lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 2 +- lib/Target/R600/AMDGPUTargetTransformInfo.cpp | 2 +- lib/Target/X86/X86TargetTransformInfo.cpp | 2 +- lib/Target/XCore/XCoreTargetTransformInfo.cpp | 2 +- 9 files changed, 8 insertions(+), 18 deletions(-) diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index c2545542480..321910c0139 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -106,16 +106,6 @@ #define LLVM_DELETED_FUNCTION #endif -/// LLVM_FINAL - Expands to 'final' if the compiler supports it. -/// Use to mark classes or virtual methods as final. -#if __has_feature(cxx_override_control) || \ - (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_PREREQ(4, 7)) || \ - LLVM_MSC_PREREQ(1700) -#define LLVM_FINAL final -#else -#define LLVM_FINAL -#endif - /// LLVM_OVERRIDE - Expands to 'override' if the compiler supports it. /// Use to mark virtual methods as overriding a base class method. #if __has_feature(cxx_override_control) || \ diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp index d4a0a13ca11..8a680107ff9 100644 --- a/lib/Analysis/TargetTransformInfo.cpp +++ b/lib/Analysis/TargetTransformInfo.cpp @@ -241,7 +241,7 @@ unsigned TargetTransformInfo::getReductionCost(unsigned Opcode, Type *Ty, namespace { -struct NoTTI LLVM_FINAL : ImmutablePass, TargetTransformInfo { +struct NoTTI final : ImmutablePass, TargetTransformInfo { const DataLayout *DL; NoTTI() : ImmutablePass(ID), DL(0) { diff --git a/lib/CodeGen/BasicTargetTransformInfo.cpp b/lib/CodeGen/BasicTargetTransformInfo.cpp index a41a6b78b14..c12a90d1f7c 100644 --- a/lib/CodeGen/BasicTargetTransformInfo.cpp +++ b/lib/CodeGen/BasicTargetTransformInfo.cpp @@ -25,7 +25,7 @@ using namespace llvm; namespace { -class BasicTTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class BasicTTI final : public ImmutablePass, public TargetTransformInfo { const TargetMachine *TM; /// Estimate the overhead of scalarizing an instruction. Insert and Extract diff --git a/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/lib/Target/AArch64/AArch64TargetTransformInfo.cpp index ce442c28032..8497bee8735 100644 --- a/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ b/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -32,7 +32,7 @@ void initializeAArch64TTIPass(PassRegistry &); namespace { -class AArch64TTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class AArch64TTI final : public ImmutablePass, public TargetTransformInfo { const AArch64TargetMachine *TM; const AArch64Subtarget *ST; const AArch64TargetLowering *TLI; diff --git a/lib/Target/ARM/ARMTargetTransformInfo.cpp b/lib/Target/ARM/ARMTargetTransformInfo.cpp index 9aacee44c04..7a155919391 100644 --- a/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -32,7 +32,7 @@ void initializeARMTTIPass(PassRegistry &); namespace { -class ARMTTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class ARMTTI final : public ImmutablePass, public TargetTransformInfo { const ARMBaseTargetMachine *TM; const ARMSubtarget *ST; const ARMTargetLowering *TLI; diff --git a/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/lib/Target/PowerPC/PPCTargetTransformInfo.cpp index 51b76de07e8..70eaba0dad3 100644 --- a/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -32,7 +32,7 @@ void initializePPCTTIPass(PassRegistry &); namespace { -class PPCTTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class PPCTTI final : public ImmutablePass, public TargetTransformInfo { const PPCTargetMachine *TM; const PPCSubtarget *ST; const PPCTargetLowering *TLI; diff --git a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp index 9cdfec59412..1e35333d8ab 100644 --- a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp +++ b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp @@ -35,7 +35,7 @@ void initializeAMDGPUTTIPass(PassRegistry &); namespace { -class AMDGPUTTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class AMDGPUTTI final : public ImmutablePass, public TargetTransformInfo { const AMDGPUTargetMachine *TM; const AMDGPUSubtarget *ST; const AMDGPUTargetLowering *TLI; diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp index d50bab99ff3..9c09326ad66 100644 --- a/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/lib/Target/X86/X86TargetTransformInfo.cpp @@ -33,7 +33,7 @@ void initializeX86TTIPass(PassRegistry &); namespace { -class X86TTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class X86TTI final : public ImmutablePass, public TargetTransformInfo { const X86Subtarget *ST; const X86TargetLowering *TLI; diff --git a/lib/Target/XCore/XCoreTargetTransformInfo.cpp b/lib/Target/XCore/XCoreTargetTransformInfo.cpp index 5caaf47d5f5..a2b98a7046c 100644 --- a/lib/Target/XCore/XCoreTargetTransformInfo.cpp +++ b/lib/Target/XCore/XCoreTargetTransformInfo.cpp @@ -31,7 +31,7 @@ void initializeXCoreTTIPass(PassRegistry &); namespace { -class XCoreTTI LLVM_FINAL : public ImmutablePass, public TargetTransformInfo { +class XCoreTTI final : public ImmutablePass, public TargetTransformInfo { public: XCoreTTI() : ImmutablePass(ID) { llvm_unreachable("This pass cannot be directly constructed"); -- 2.11.0