r203893 - [C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper
craig.topper at gmail.com
Thu Mar 13 23:02:08 PDT 2014
Author: ctopper
Date: Fri Mar 14 01:02:07 2014
New Revision: 203893
URL: http://llvm.org/viewvc/llvm-project?rev=203893&view=rev
Log:
[C++11] Add 'override' keyword to virtual methods that override their base class.
Modified:
cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h
cfe/trunk/include/clang/Analysis/ProgramPoint.h
cfe/trunk/include/clang/Driver/Action.h
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/ARCMigrate/Transforms.h
cfe/trunk/lib/Analysis/CFG.cpp
cfe/trunk/lib/Analysis/UninitializedValues.cpp
cfe/trunk/lib/Driver/ToolChains.h
cfe/trunk/lib/Driver/Tools.h
Modified: cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h (original)
+++ cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h Fri Mar 14 01:02:07 2014
@@ -19,7 +19,7 @@ namespace arcmt {
class CheckAction : public WrapperFrontendAction {
protected:
- virtual bool BeginInvocation(CompilerInstance &CI);
+ bool BeginInvocation(CompilerInstance &CI) override;
public:
CheckAction(FrontendAction *WrappedAction);
@@ -27,7 +27,7 @@ public:
class ModifyAction : public WrapperFrontendAction {
protected:
- virtual bool BeginInvocation(CompilerInstance &CI);
+ bool BeginInvocation(CompilerInstance &CI) override;
public:
ModifyAction(FrontendAction *WrappedAction);
@@ -36,9 +36,9 @@ public:
class MigrateSourceAction : public ASTFrontendAction {
FileRemapper Remapper;
protected:
- virtual bool BeginInvocation(CompilerInstance &CI);
- virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- StringRef InFile);
+ bool BeginInvocation(CompilerInstance &CI) override;
+ ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) override;
};
class MigrateAction : public WrapperFrontendAction {
@@ -46,7 +46,7 @@ class MigrateAction : public WrapperFron
std::string PlistOut;
bool EmitPremigrationARCErros;
protected:
- virtual bool BeginInvocation(CompilerInstance &CI);
+ bool BeginInvocation(CompilerInstance &CI) override;
public:
MigrateAction(FrontendAction *WrappedAction, StringRef migrateDir,
@@ -65,8 +65,9 @@ public:
unsigned migrateAction);
protected:
- virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,StringRef InFile);
- virtual bool BeginInvocation(CompilerInstance &CI);
+ ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) override;
+ bool BeginInvocation(CompilerInstance &CI) override;
};
}
Modified: cfe/trunk/include/clang/Analysis/ProgramPoint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ProgramPoint.h?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/ProgramPoint.h (original)
+++ cfe/trunk/include/clang/Analysis/ProgramPoint.h Fri Mar 14 01:02:07 2014
@@ -663,7 +663,7 @@ class SimpleProgramPointTag : public Pro
std::string Desc;
public:
SimpleProgramPointTag(StringRef MsgProvider, StringRef Msg);
- StringRef getTagDescription() const;
+ StringRef getTagDescription() const override;
};
} // end namespace clang
Modified: cfe/trunk/include/clang/Driver/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Action.h?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Action.h (original)
+++ cfe/trunk/include/clang/Driver/Action.h Fri Mar 14 01:02:07 2014
@@ -142,7 +142,7 @@ public:
};
class PreprocessJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
PreprocessJobAction(Action *Input, types::ID OutputType);
@@ -152,7 +152,7 @@ public:
};
class PrecompileJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
PrecompileJobAction(Action *Input, types::ID OutputType);
@@ -162,7 +162,7 @@ public:
};
class AnalyzeJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
AnalyzeJobAction(Action *Input, types::ID OutputType);
@@ -172,7 +172,7 @@ public:
};
class MigrateJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
MigrateJobAction(Action *Input, types::ID OutputType);
@@ -182,7 +182,7 @@ public:
};
class CompileJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
CompileJobAction(Action *Input, types::ID OutputType);
@@ -192,7 +192,7 @@ public:
};
class AssembleJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
AssembleJobAction(Action *Input, types::ID OutputType);
@@ -202,7 +202,7 @@ public:
};
class LinkJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
LinkJobAction(ActionList &Inputs, types::ID Type);
@@ -212,7 +212,7 @@ public:
};
class LipoJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
LipoJobAction(ActionList &Inputs, types::ID Type);
@@ -222,7 +222,7 @@ public:
};
class DsymutilJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
DsymutilJobAction(ActionList &Inputs, types::ID Type);
@@ -232,7 +232,7 @@ public:
};
class VerifyJobAction : public JobAction {
- virtual void anchor();
+ void anchor() override;
public:
VerifyJobAction(ActionClass Kind, Action *Input, types::ID Type);
VerifyJobAction(ActionClass Kind, ActionList &Inputs, types::ID Type);
@@ -243,7 +243,7 @@ public:
};
class VerifyDebugInfoJobAction : public VerifyJobAction {
- virtual void anchor();
+ void anchor() override;
public:
VerifyDebugInfoJobAction(Action *Input, types::ID Type);
static bool classof(const Action *A) {
@@ -252,7 +252,7 @@ public:
};
class VerifyPCHJobAction : public VerifyJobAction {
- virtual void anchor();
+ void anchor() override;
public:
VerifyPCHJobAction(Action *Input, types::ID Type);
static bool classof(const Action *A) {
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Fri Mar 14 01:02:07 2014
@@ -103,8 +103,8 @@ public:
: Diags(diags), DiagClient(client), CapturedDiags(capturedDiags),
HasBegunSourceFile(false) { }
- virtual void BeginSourceFile(const LangOptions &Opts,
- const Preprocessor *PP) {
+ void BeginSourceFile(const LangOptions &Opts,
+ const Preprocessor *PP) override {
// Pass BeginSourceFile message onto DiagClient on first call.
// The corresponding EndSourceFile call will be made from an
// explicit call to FinishCapture.
@@ -128,8 +128,8 @@ public:
assert(!HasBegunSourceFile && "FinishCapture not called!");
}
- virtual void HandleDiagnostic(DiagnosticsEngine::Level level,
- const Diagnostic &Info) {
+ void HandleDiagnostic(DiagnosticsEngine::Level level,
+ const Diagnostic &Info) override {
if (DiagnosticIDs::isARCDiagnostic(Info.getID()) ||
level >= DiagnosticsEngine::Error || level == DiagnosticsEngine::Note) {
if (Info.getLocation().isValid())
@@ -433,8 +433,8 @@ public:
ARCMTMacroTrackerPPCallbacks(std::vector<SourceLocation> &ARCMTMacroLocs)
: ARCMTMacroLocs(ARCMTMacroLocs) { }
- virtual void MacroExpands(const Token &MacroNameTok, const MacroDirective *MD,
- SourceRange Range, const MacroArgs *Args) {
+ void MacroExpands(const Token &MacroNameTok, const MacroDirective *MD,
+ SourceRange Range, const MacroArgs *Args) override {
if (MacroNameTok.getIdentifierInfo()->getName() == getARCMTMacroName())
ARCMTMacroLocs.push_back(MacroNameTok.getLocation());
}
@@ -447,8 +447,8 @@ public:
ARCMTMacroTrackerAction(std::vector<SourceLocation> &ARCMTMacroLocs)
: ARCMTMacroLocs(ARCMTMacroLocs) { }
- virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- StringRef InFile) {
+ ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) override {
CI.getPreprocessor().addPPCallbacks(
new ARCMTMacroTrackerPPCallbacks(ARCMTMacroLocs));
return new ASTConsumer();
@@ -471,14 +471,14 @@ public:
Listener->finish();
}
- virtual void insert(SourceLocation loc, StringRef text) {
+ void insert(SourceLocation loc, StringRef text) override {
bool err = rewriter.InsertText(loc, text, /*InsertAfter=*/true,
/*indentNewLines=*/true);
if (!err && Listener)
Listener->insert(loc, text);
}
- virtual void remove(CharSourceRange range) {
+ void remove(CharSourceRange range) override {
Rewriter::RewriteOptions removeOpts;
removeOpts.IncludeInsertsAtBeginOfRange = false;
removeOpts.IncludeInsertsAtEndOfRange = false;
@@ -489,8 +489,8 @@ public:
Listener->remove(range);
}
- virtual void increaseIndentation(CharSourceRange range,
- SourceLocation parentIndent) {
+ void increaseIndentation(CharSourceRange range,
+ SourceLocation parentIndent) override {
rewriter.IncreaseIndentation(range, parentIndent);
}
};
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Fri Mar 14 01:02:07 2014
@@ -120,26 +120,26 @@ public:
}
protected:
- virtual void Initialize(ASTContext &Context) {
+ void Initialize(ASTContext &Context) override {
NSAPIObj.reset(new NSAPI(Context));
Editor.reset(new edit::EditedSource(Context.getSourceManager(),
Context.getLangOpts(),
PPRec, false));
}
- virtual bool HandleTopLevelDecl(DeclGroupRef DG) {
+ bool HandleTopLevelDecl(DeclGroupRef DG) override {
for (DeclGroupRef::iterator I = DG.begin(), E = DG.end(); I != E; ++I)
migrateDecl(*I);
return true;
}
- virtual void HandleInterestingDecl(DeclGroupRef DG) {
+ void HandleInterestingDecl(DeclGroupRef DG) override {
// Ignore decls from the PCH.
}
- virtual void HandleTopLevelDeclInObjCContainer(DeclGroupRef DG) {
+ void HandleTopLevelDeclInObjCContainer(DeclGroupRef DG) override {
ObjCMigrateASTConsumer::HandleTopLevelDecl(DG);
}
- virtual void HandleTranslationUnit(ASTContext &Ctx);
+ void HandleTranslationUnit(ASTContext &Ctx) override;
bool canModifyFile(StringRef Path) {
if (WhiteListFilenames.empty())
@@ -1610,10 +1610,10 @@ class RewritesReceiver : public edit::Ed
public:
RewritesReceiver(Rewriter &Rewrite) : Rewrite(Rewrite) { }
- virtual void insert(SourceLocation loc, StringRef text) {
+ void insert(SourceLocation loc, StringRef text) override {
Rewrite.InsertText(loc, text);
}
- virtual void replace(CharSourceRange range, StringRef text) {
+ void replace(CharSourceRange range, StringRef text) override {
Rewrite.ReplaceText(range.getBegin(), Rewrite.getRangeSize(range), text);
}
};
@@ -1676,20 +1676,20 @@ private:
}
};
- virtual void insert(SourceLocation Loc, StringRef Text) {
+ void insert(SourceLocation Loc, StringRef Text) override {
EntryWriter Writer(SourceMgr, OS);
Writer.writeLoc(Loc);
Writer.writeText(Text);
}
- virtual void replace(CharSourceRange Range, StringRef Text) {
+ void replace(CharSourceRange Range, StringRef Text) override {
EntryWriter Writer(SourceMgr, OS);
Writer.writeLoc(Range.getBegin());
Writer.writeRemove(Range);
Writer.writeText(Text);
}
- virtual void remove(CharSourceRange Range) {
+ void remove(CharSourceRange Range) override {
EntryWriter Writer(SourceMgr, OS);
Writer.writeLoc(Range.getBegin());
Writer.writeRemove(Range);
Modified: cfe/trunk/lib/ARCMigrate/Transforms.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/Transforms.h?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/Transforms.h (original)
+++ cfe/trunk/lib/ARCMigrate/Transforms.h Fri Mar 14 01:02:07 2014
@@ -127,29 +127,29 @@ public:
class PropertyRewriteTraverser : public ASTTraverser {
public:
- virtual void traverseObjCImplementation(ObjCImplementationContext &ImplCtx);
+ void traverseObjCImplementation(ObjCImplementationContext &ImplCtx) override;
};
class BlockObjCVariableTraverser : public ASTTraverser {
public:
- virtual void traverseBody(BodyContext &BodyCtx);
+ void traverseBody(BodyContext &BodyCtx) override;
};
class ProtectedScopeTraverser : public ASTTraverser {
public:
- virtual void traverseBody(BodyContext &BodyCtx);
+ void traverseBody(BodyContext &BodyCtx) override;
};
// GC transformations
class GCAttrsTraverser : public ASTTraverser {
public:
- virtual void traverseTU(MigrationContext &MigrateCtx);
+ void traverseTU(MigrationContext &MigrateCtx) override;
};
class GCCollectableCallsTraverser : public ASTTraverser {
public:
- virtual void traverseBody(BodyContext &BodyCtx);
+ void traverseBody(BodyContext &BodyCtx) override;
};
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Fri Mar 14 01:02:07 2014
@@ -3629,7 +3629,7 @@ public:
void setBlockID(signed i) { currentBlock = i; }
void setStmtID(unsigned i) { currStmt = i; }
- virtual bool handledStmt(Stmt *S, raw_ostream &OS) {
+ bool handledStmt(Stmt *S, raw_ostream &OS) override {
StmtMapTy::iterator I = StmtMap.find(S);
if (I == StmtMap.end())
Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UninitializedValues.cpp?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/UninitializedValues.cpp (original)
+++ cfe/trunk/lib/Analysis/UninitializedValues.cpp Fri Mar 14 01:02:07 2014
@@ -792,8 +792,8 @@ struct PruneBlocksHandler : public Unini
/// The current block to scribble use information.
unsigned currentBlock;
- virtual void handleUseOfUninitVariable(const VarDecl *vd,
- const UninitUse &use) {
+ void handleUseOfUninitVariable(const VarDecl *vd,
+ const UninitUse &use) override {
hadUse[currentBlock] = true;
hadAnyUse = true;
}
@@ -801,7 +801,7 @@ struct PruneBlocksHandler : public Unini
/// Called when the uninitialized variable analysis detects the
/// idiom 'int x = x'. All other uses of 'x' within the initializer
/// are handled by handleUseOfUninitVariable.
- virtual void handleSelfInit(const VarDecl *vd) {
+ void handleSelfInit(const VarDecl *vd) override {
hadUse[currentBlock] = true;
hadAnyUse = true;
}
Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Fri Mar 14 01:02:07 2014
@@ -161,18 +161,18 @@ public:
const llvm::opt::ArgList &Args);
~Generic_GCC();
- virtual void printVerboseInfo(raw_ostream &OS) const;
+ void printVerboseInfo(raw_ostream &OS) const override;
- virtual bool IsUnwindTablesDefault() const;
- virtual bool isPICDefault() const;
- virtual bool isPIEDefault() const;
- virtual bool isPICDefaultForced() const;
- virtual bool IsIntegratedAssemblerDefault() const;
+ bool IsUnwindTablesDefault() const override;
+ bool isPICDefault() const override;
+ bool isPIEDefault() const override;
+ bool isPICDefaultForced() const override;
+ bool IsIntegratedAssemblerDefault() const override;
protected:
- virtual Tool *getTool(Action::ActionClass AC) const;
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *getTool(Action::ActionClass AC) const override;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
/// \name ToolChain Implementation Helper Functions
/// @{
@@ -192,9 +192,9 @@ private:
class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
- virtual Tool *getTool(Action::ActionClass AC) const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
+ Tool *getTool(Action::ActionClass AC) const override;
private:
mutable std::unique_ptr<tools::darwin::Lipo> Lipo;
mutable std::unique_ptr<tools::darwin::Dsymutil> Dsymutil;
@@ -250,62 +250,62 @@ public:
/// {
std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args,
- types::ID InputType) const;
+ types::ID InputType) const override;
- virtual types::ID LookupTypeForExtension(const char *Ext) const;
+ types::ID LookupTypeForExtension(const char *Ext) const override;
- virtual bool HasNativeLLVMSupport() const;
+ bool HasNativeLLVMSupport() const override;
- virtual llvm::opt::DerivedArgList *
+ llvm::opt::DerivedArgList *
TranslateArgs(const llvm::opt::DerivedArgList &Args,
- const char *BoundArch) const;
+ const char *BoundArch) const override;
- virtual bool IsBlocksDefault() const {
+ bool IsBlocksDefault() const override {
// Always allow blocks on Apple; users interested in versioning are
// expected to use /usr/include/Blocks.h.
return true;
}
- virtual bool IsIntegratedAssemblerDefault() const {
+ bool IsIntegratedAssemblerDefault() const override {
// Default integrated assembler to on for Apple's MachO targets.
return true;
}
- virtual bool IsMathErrnoDefault() const {
+ bool IsMathErrnoDefault() const override {
return false;
}
- virtual bool IsEncodeExtendedBlockSignatureDefault() const {
+ bool IsEncodeExtendedBlockSignatureDefault() const override {
return true;
}
- virtual bool IsObjCNonFragileABIDefault() const {
+ bool IsObjCNonFragileABIDefault() const override {
// Non-fragile ABI is default for everything but i386.
return getTriple().getArch() != llvm::Triple::x86;
}
- virtual bool UseObjCMixedDispatch() const {
+ bool UseObjCMixedDispatch() const override {
return true;
}
- virtual bool IsUnwindTablesDefault() const;
+ bool IsUnwindTablesDefault() const override;
- virtual RuntimeLibType GetDefaultRuntimeLibType() const {
+ RuntimeLibType GetDefaultRuntimeLibType() const override {
return ToolChain::RLT_CompilerRT;
}
- virtual bool isPICDefault() const;
- virtual bool isPIEDefault() const;
- virtual bool isPICDefaultForced() const;
+ bool isPICDefault() const override;
+ bool isPIEDefault() const override;
+ bool isPICDefaultForced() const override;
- virtual bool SupportsProfiling() const;
+ bool SupportsProfiling() const override;
- virtual bool SupportsObjCGC() const {
+ bool SupportsObjCGC() const override {
return false;
}
- virtual bool UseDwarfDebugFlags() const;
+ bool UseDwarfDebugFlags() const override;
- virtual bool UseSjLjExceptions() const {
+ bool UseSjLjExceptions() const override {
return false;
}
@@ -354,20 +354,20 @@ public:
~Darwin();
std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args,
- types::ID InputType) const;
+ types::ID InputType) const override;
/// @name Apple Specific Toolchain Implementation
/// {
- virtual void
+ void
addMinVersionArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
- virtual void
+ void
addStartObjectFileArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
- virtual bool isKernelStatic() const {
+ bool isKernelStatic() const override {
return !isTargetIPhoneOS() || isIPhoneOSVersionLT(6, 0);
}
@@ -433,21 +433,21 @@ public:
/// @name ToolChain Implementation
/// {
- virtual llvm::opt::DerivedArgList *
+ llvm::opt::DerivedArgList *
TranslateArgs(const llvm::opt::DerivedArgList &Args,
- const char *BoundArch) const;
+ const char *BoundArch) const override;
- virtual ObjCRuntime getDefaultObjCRuntime(bool isNonFragile) const;
- virtual bool hasBlocksRuntime() const;
+ ObjCRuntime getDefaultObjCRuntime(bool isNonFragile) const override;
+ bool hasBlocksRuntime() const override;
- virtual bool UseObjCMixedDispatch() const {
+ bool UseObjCMixedDispatch() const override {
// This is only used with the non-fragile ABI and non-legacy dispatch.
// Mixed dispatch is used everywhere except OS X before 10.6.
return !(isTargetMacOS() && isMacosxVersionLT(10, 6));
}
- virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const {
+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
// Stack protectors default to on for user code on 10.5,
// and for everything in 10.6 and beyond
if (isTargetIOSBased())
@@ -460,11 +460,11 @@ public:
return 0;
}
- virtual bool SupportsObjCGC() const;
+ bool SupportsObjCGC() const override;
- virtual void CheckObjCARC() const;
+ void CheckObjCARC() const override;
- virtual bool UseSjLjExceptions() const;
+ bool UseSjLjExceptions() const override;
};
/// DarwinClang - The Darwin toolchain used by Clang.
@@ -476,19 +476,19 @@ public:
/// @name Apple ToolChain Implementation
/// {
- virtual void
+ void
AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
- virtual void
+ void
AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
- virtual void
+ void
AddCCKextLibArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
- virtual void
+ void
AddLinkARCArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
/// }
@@ -501,8 +501,8 @@ public:
const llvm::opt::ArgList &Args)
: Generic_GCC(D, Triple, Args) {}
- virtual void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
+ void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
+ llvm::opt::ArgStringList &CC1Args) const override;
};
class LLVM_LIBRARY_VISIBILITY AuroraUX : public Generic_GCC {
@@ -511,8 +511,8 @@ public:
const llvm::opt::ArgList &Args);
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY Solaris : public Generic_GCC {
@@ -520,10 +520,10 @@ public:
Solaris(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool IsIntegratedAssemblerDefault() const { return true; }
+ bool IsIntegratedAssemblerDefault() const override { return true; }
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
@@ -533,17 +533,17 @@ public:
OpenBSD(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool IsMathErrnoDefault() const { return false; }
- virtual bool IsObjCNonFragileABIDefault() const { return true; }
- virtual bool isPIEDefault() const { return true; }
+ bool IsMathErrnoDefault() const override { return false; }
+ bool IsObjCNonFragileABIDefault() const override { return true; }
+ bool isPIEDefault() const override { return true; }
- virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const {
+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
return 1;
}
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY Bitrig : public Generic_ELF {
@@ -551,49 +551,49 @@ public:
Bitrig(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool IsMathErrnoDefault() const { return false; }
- virtual bool IsObjCNonFragileABIDefault() const { return true; }
+ bool IsMathErrnoDefault() const override { return false; }
+ bool IsObjCNonFragileABIDefault() const override { return true; }
virtual bool IsObjCLegacyDispatchDefault() const { return false; }
- virtual void
+ void
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
- llvm::opt::ArgStringList &CmdArgs) const;
- virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const {
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
+ llvm::opt::ArgStringList &CmdArgs) const override;
+ unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
return 1;
}
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF {
public:
FreeBSD(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool HasNativeLLVMSupport() const;
+ bool HasNativeLLVMSupport() const override;
- virtual bool IsMathErrnoDefault() const { return false; }
- virtual bool IsObjCNonFragileABIDefault() const { return true; }
+ bool IsMathErrnoDefault() const override { return false; }
+ bool IsObjCNonFragileABIDefault() const override { return true; }
- virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const;
- virtual void
+ CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
+ void
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual bool IsIntegratedAssemblerDefault() const {
+ llvm::opt::ArgStringList &CC1Args) const override;
+ bool IsIntegratedAssemblerDefault() const override {
if (getTriple().getArch() == llvm::Triple::ppc ||
getTriple().getArch() == llvm::Triple::ppc64)
return true;
return Generic_ELF::IsIntegratedAssemblerDefault();
}
- virtual bool UseSjLjExceptions() const;
- virtual bool isPIEDefault() const;
+ bool UseSjLjExceptions() const override;
+ bool isPIEDefault() const override;
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {
@@ -601,26 +601,26 @@ public:
NetBSD(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool IsMathErrnoDefault() const { return false; }
- virtual bool IsObjCNonFragileABIDefault() const { return true; }
+ bool IsMathErrnoDefault() const override { return false; }
+ bool IsObjCNonFragileABIDefault() const override { return true; }
- virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const;
+ CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
- virtual void
+ void
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual bool IsUnwindTablesDefault() const {
+ llvm::opt::ArgStringList &CC1Args) const override;
+ bool IsUnwindTablesDefault() const override {
return true;
}
- virtual bool IsIntegratedAssemblerDefault() const {
+ bool IsIntegratedAssemblerDefault() const override {
if (getTriple().getArch() == llvm::Triple::ppc)
return true;
return Generic_ELF::IsIntegratedAssemblerDefault();
}
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY Minix : public Generic_ELF {
@@ -629,8 +629,8 @@ public:
const llvm::opt::ArgList &Args);
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF {
@@ -638,11 +638,11 @@ public:
DragonFly(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool IsMathErrnoDefault() const { return false; }
+ bool IsMathErrnoDefault() const override { return false; }
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
};
class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF {
@@ -650,22 +650,22 @@ public:
Linux(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool HasNativeLLVMSupport() const;
+ bool HasNativeLLVMSupport() const override;
- virtual void
+ void
AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual bool isPIEDefault() const;
+ llvm::opt::ArgStringList &CC1Args) const override;
+ bool isPIEDefault() const override;
std::string Linker;
std::vector<std::string> ExtraOpts;
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
private:
static bool addLibStdCXXIncludePaths(Twine Base, Twine Suffix,
@@ -682,21 +682,21 @@ private:
class LLVM_LIBRARY_VISIBILITY Hexagon_TC : public Linux {
protected:
GCCVersion GCCLibAndIncVersion;
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
public:
Hexagon_TC(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
~Hexagon_TC();
- virtual void
+ void
AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const;
+ llvm::opt::ArgStringList &CC1Args) const override;
+ CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
StringRef GetGCCLibAndIncVersion() const { return GCCLibAndIncVersion.Text; }
@@ -713,10 +713,10 @@ public:
const llvm::opt::ArgList &Args);
~TCEToolChain();
- bool IsMathErrnoDefault() const;
- bool isPICDefault() const;
- bool isPIEDefault() const;
- bool isPICDefaultForced() const;
+ bool IsMathErrnoDefault() const override;
+ bool isPICDefault() const override;
+ bool isPIEDefault() const override;
+ bool isPICDefaultForced() const override;
};
class LLVM_LIBRARY_VISIBILITY Windows : public ToolChain {
@@ -724,22 +724,22 @@ public:
Windows(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- virtual bool IsIntegratedAssemblerDefault() const;
- virtual bool IsUnwindTablesDefault() const;
- virtual bool isPICDefault() const;
- virtual bool isPIEDefault() const;
- virtual bool isPICDefaultForced() const;
+ bool IsIntegratedAssemblerDefault() const override;
+ bool IsUnwindTablesDefault() const override;
+ bool isPICDefault() const override;
+ bool isPIEDefault() const override;
+ bool isPICDefaultForced() const override;
- virtual void
+ void
AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
+ llvm::opt::ArgStringList &CC1Args) const override;
protected:
- virtual Tool *buildLinker() const;
- virtual Tool *buildAssembler() const;
+ Tool *buildLinker() const override;
+ Tool *buildAssembler() const override;
};
@@ -748,22 +748,22 @@ public:
XCore(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
protected:
- virtual Tool *buildAssembler() const;
- virtual Tool *buildLinker() const;
+ Tool *buildAssembler() const override;
+ Tool *buildLinker() const override;
public:
- virtual bool isPICDefault() const;
- virtual bool isPIEDefault() const;
- virtual bool isPICDefaultForced() const;
- virtual bool SupportsProfiling() const;
- virtual bool hasBlocksRuntime() const;
- virtual void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const;
- virtual void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
- llvm::opt::ArgStringList &CmdArgs) const;
+ bool isPICDefault() const override;
+ bool isPIEDefault() const override;
+ bool isPICDefaultForced() const override;
+ bool SupportsProfiling() const override;
+ bool hasBlocksRuntime() const override;
+ void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
+ llvm::opt::ArgStringList &CC1Args) const override;
+ void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
+ llvm::opt::ArgStringList &CmdArgs) const override;
};
} // end namespace toolchains
Modified: cfe/trunk/lib/Driver/Tools.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.h?rev=203893&r1=203892&r2=203893&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.h (original)
+++ cfe/trunk/lib/Driver/Tools.h Fri Mar 14 01:02:07 2014
@@ -79,15 +79,14 @@ using llvm::opt::ArgStringList;
public:
Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC) {}
- virtual bool hasGoodDiagnostics() const { return true; }
- virtual bool hasIntegratedAssembler() const { return true; }
- virtual bool hasIntegratedCPP() const { return true; }
-
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ bool hasGoodDiagnostics() const override { return true; }
+ bool hasIntegratedAssembler() const override { return true; }
+ bool hasIntegratedCPP() const override { return true; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
/// \brief Clang integrated assembler tool.
@@ -96,15 +95,14 @@ using llvm::opt::ArgStringList;
ClangAs(const ToolChain &TC) : Tool("clang::as",
"clang integrated assembler", TC) {}
- virtual bool hasGoodDiagnostics() const { return true; }
- virtual bool hasIntegratedAssembler() const { return false; }
- virtual bool hasIntegratedCPP() const { return false; }
-
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ bool hasGoodDiagnostics() const override { return true; }
+ bool hasIntegratedAssembler() const override { return false; }
+ bool hasIntegratedCPP() const override { return false; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
/// gcc - Generic GCC tool implementations.
@@ -114,11 +112,11 @@ namespace gcc {
Common(const char *Name, const char *ShortName,
const ToolChain &TC) : Tool(Name, ShortName, TC) {}
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
/// RenderExtraToolArgs - Render any arguments necessary to force
/// the particular tool mode.
@@ -132,11 +130,11 @@ namespace gcc {
Preprocess(const ToolChain &TC) : Common("gcc::Preprocess",
"gcc preprocessor", TC) {}
- virtual bool hasGoodDiagnostics() const { return true; }
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasGoodDiagnostics() const override { return true; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void RenderExtraToolArgs(const JobAction &JA,
- llvm::opt::ArgStringList &CmdArgs) const;
+ void RenderExtraToolArgs(const JobAction &JA,
+ llvm::opt::ArgStringList &CmdArgs) const override;
};
class LLVM_LIBRARY_VISIBILITY Compile : public Common {
@@ -144,11 +142,11 @@ namespace gcc {
Compile(const ToolChain &TC) : Common("gcc::Compile",
"gcc frontend", TC) {}
- virtual bool hasGoodDiagnostics() const { return true; }
- virtual bool hasIntegratedCPP() const { return true; }
+ bool hasGoodDiagnostics() const override { return true; }
+ bool hasIntegratedCPP() const override { return true; }
- virtual void RenderExtraToolArgs(const JobAction &JA,
- llvm::opt::ArgStringList &CmdArgs) const;
+ void RenderExtraToolArgs(const JobAction &JA,
+ llvm::opt::ArgStringList &CmdArgs) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Common {
@@ -156,11 +154,11 @@ namespace gcc {
Link(const ToolChain &TC) : Common("gcc::Link",
"linker (via gcc)", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void RenderExtraToolArgs(const JobAction &JA,
- llvm::opt::ArgStringList &CmdArgs) const;
+ void RenderExtraToolArgs(const JobAction &JA,
+ llvm::opt::ArgStringList &CmdArgs) const override;
};
} // end namespace gcc
@@ -172,15 +170,14 @@ namespace hexagon {
Assemble(const ToolChain &TC) : Tool("hexagon::Assemble",
"hexagon-as", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
virtual void RenderExtraToolArgs(const JobAction &JA,
llvm::opt::ArgStringList &CmdArgs) const;
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
@@ -188,16 +185,15 @@ namespace hexagon {
Link(const ToolChain &TC) : Tool("hexagon::Link",
"hexagon-ld", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
virtual void RenderExtraToolArgs(const JobAction &JA,
llvm::opt::ArgStringList &CmdArgs) const;
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace hexagon.
@@ -237,13 +233,12 @@ namespace darwin {
Assemble(const ToolChain &TC) : MachOTool("darwin::Assemble",
"assembler", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public MachOTool {
@@ -255,27 +250,25 @@ namespace darwin {
public:
Link(const ToolChain &TC) : MachOTool("darwin::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool {
public:
Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool {
@@ -283,14 +276,14 @@ namespace darwin {
Dsymutil(const ToolChain &TC) : MachOTool("darwin::Dsymutil",
"dsymutil", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isDsymutilJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isDsymutilJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool {
@@ -298,13 +291,12 @@ namespace darwin {
VerifyDebug(const ToolChain &TC) : MachOTool("darwin::VerifyDebug",
"dwarfdump", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
}
@@ -316,26 +308,25 @@ namespace openbsd {
Assemble(const ToolChain &TC) : Tool("openbsd::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("openbsd::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace openbsd
@@ -346,26 +337,24 @@ namespace bitrig {
Assemble(const ToolChain &TC) : Tool("bitrig::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("bitrig::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace bitrig
@@ -376,26 +365,24 @@ namespace freebsd {
Assemble(const ToolChain &TC) : Tool("freebsd::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("freebsd::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace freebsd
@@ -407,13 +394,12 @@ namespace netbsd {
Assemble(const ToolChain &TC)
: Tool("netbsd::Assemble", "assembler", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
@@ -421,14 +407,13 @@ namespace netbsd {
Link(const ToolChain &TC)
: Tool("netbsd::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace netbsd
@@ -438,26 +423,26 @@ namespace gnutools {
public:
Assemble(const ToolChain &TC) : Tool("GNU::Assemble", "assembler", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("GNU::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
}
/// minix -- Directly call GNU Binutils assembler and linker
@@ -467,26 +452,26 @@ namespace minix {
Assemble(const ToolChain &TC) : Tool("minix::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("minix::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace minix
@@ -497,26 +482,24 @@ namespace solaris {
Assemble(const ToolChain &TC) : Tool("solaris::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("solaris::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace solaris
@@ -527,26 +510,24 @@ namespace auroraux {
Assemble(const ToolChain &TC) : Tool("auroraux::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("auroraux::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace auroraux
@@ -557,26 +538,25 @@ namespace dragonfly {
Assemble(const ToolChain &TC) : Tool("dragonfly::Assemble", "assembler",
TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
+ bool hasIntegratedCPP() const override { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
public:
Link(const ToolChain &TC) : Tool("dragonfly::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace dragonfly
@@ -586,29 +566,27 @@ namespace visualstudio {
public:
Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Compile : public Tool {
public:
Compile(const ToolChain &TC) : Tool("visualstudio::Compile", "compiler", TC) {}
- virtual bool hasIntegratedAssembler() const { return true; }
- virtual bool hasIntegratedCPP() const { return true; }
- virtual bool isLinkJob() const { return false; }
-
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ bool hasIntegratedAssembler() const override { return true; }
+ bool hasIntegratedCPP() const override { return true; }
+ bool isLinkJob() const override { return false; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
Command *GetCommand(Compilation &C, const JobAction &JA,
const InputInfo &Output,
@@ -630,12 +608,11 @@ namespace XCore {
Assemble(const ToolChain &TC) : Tool("XCore::Assemble",
"XCore-as", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ bool hasIntegratedCPP() const override { return false; }
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
@@ -643,13 +620,12 @@ namespace XCore {
Link(const ToolChain &TC) : Tool("XCore::Link",
"XCore-ld", TC) {}
- virtual bool hasIntegratedCPP() const { return false; }
- virtual bool isLinkJob() const { return true; }
- virtual void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const;
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() const override { return true; }
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
};
} // end namespace XCore.
More information about the cfe-commits
mailing list