summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-03-05 07:52:44 +0000
committerCraig Topper <craig.topper@gmail.com>2014-03-05 07:52:44 +0000
commit01394fb9e4d4fcf401e98116c02866d64047008d (patch)
treeacffe20d43eeec66146b7bad4299786b2d2c39a2 /lib
parentc37e6c073436be77e90ef640c0e6627200ba19f7 (diff)
downloadllvm-01394fb9e4d4fcf401e98116c02866d64047008d.tar.gz
llvm-01394fb9e4d4fcf401e98116c02866d64047008d.tar.bz2
llvm-01394fb9e4d4fcf401e98116c02866d64047008d.tar.xz
[C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.h10
-rw-r--r--lib/Bitcode/Writer/BitcodeWriterPass.cpp4
-rw-r--r--lib/DebugInfo/DWARFContext.h60
-rw-r--r--lib/DebugInfo/DWARFDebugFrame.cpp4
-rw-r--r--lib/DebugInfo/DWARFDebugLine.h2
-rw-r--r--lib/Linker/LinkModules.cpp4
6 files changed, 42 insertions, 42 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h
index 56795e2367..daa16349b8 100644
--- a/lib/Bitcode/Reader/BitcodeReader.h
+++ b/lib/Bitcode/Reader/BitcodeReader.h
@@ -247,11 +247,11 @@ public:
/// when the reader is destroyed.
void setBufferOwned(bool Owned) { BufferOwned = Owned; }
- virtual bool isMaterializable(const GlobalValue *GV) const;
- virtual bool isDematerializable(const GlobalValue *GV) const;
- virtual error_code Materialize(GlobalValue *GV);
- virtual error_code MaterializeModule(Module *M);
- virtual void Dematerialize(GlobalValue *GV);
+ bool isMaterializable(const GlobalValue *GV) const override;
+ bool isDematerializable(const GlobalValue *GV) const override;
+ error_code Materialize(GlobalValue *GV) override;
+ error_code MaterializeModule(Module *M) override;
+ void Dematerialize(GlobalValue *GV) override;
/// @brief Main interface to parsing a bitcode buffer.
/// @returns true if an error occurred.
diff --git a/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/lib/Bitcode/Writer/BitcodeWriterPass.cpp
index 4757cacb4c..4167f6da50 100644
--- a/lib/Bitcode/Writer/BitcodeWriterPass.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriterPass.cpp
@@ -31,9 +31,9 @@ namespace {
explicit WriteBitcodePass(raw_ostream &o)
: ModulePass(ID), OS(o) {}
- const char *getPassName() const { return "Bitcode Writer"; }
+ const char *getPassName() const override { return "Bitcode Writer"; }
- bool runOnModule(Module &M) {
+ bool runOnModule(Module &M) override {
WriteBitcodeToFile(&M, OS);
return false;
}
diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h
index 2a534de49d..823e98a6b3 100644
--- a/lib/DebugInfo/DWARFContext.h
+++ b/lib/DebugInfo/DWARFContext.h
@@ -71,7 +71,7 @@ public:
return DICtx->getKind() == CK_DWARF;
}
- virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All);
+ void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All) override;
/// Get the number of compile units in this context.
unsigned getNumCompileUnits() {
@@ -148,12 +148,12 @@ public:
const DWARFDebugLine::LineTable *
getLineTableForCompileUnit(DWARFCompileUnit *cu);
- virtual DILineInfo getLineInfoForAddress(uint64_t Address,
- DILineInfoSpecifier Specifier = DILineInfoSpecifier());
- virtual DILineInfoTable getLineInfoForAddressRange(uint64_t Address,
- uint64_t Size, DILineInfoSpecifier Specifier = DILineInfoSpecifier());
- virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address,
- DILineInfoSpecifier Specifier = DILineInfoSpecifier());
+ DILineInfo getLineInfoForAddress(uint64_t Address,
+ DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
+ DILineInfoTable getLineInfoForAddressRange(uint64_t Address, uint64_t Size,
+ DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
+ DIInliningInfo getInliningInfoForAddress(uint64_t Address,
+ DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
virtual bool isLittleEndian() const = 0;
virtual uint8_t getAddressSize() const = 0;
@@ -231,35 +231,35 @@ class DWARFContextInMemory : public DWARFContext {
public:
DWARFContextInMemory(object::ObjectFile *);
~DWARFContextInMemory();
- virtual bool isLittleEndian() const { return IsLittleEndian; }
- virtual uint8_t getAddressSize() const { return AddressSize; }
- virtual const Section &getInfoSection() { return InfoSection; }
- virtual const TypeSectionMap &getTypesSections() { return TypesSections; }
- virtual StringRef getAbbrevSection() { return AbbrevSection; }
- virtual const Section &getLocSection() { return LocSection; }
- virtual StringRef getARangeSection() { return ARangeSection; }
- virtual StringRef getDebugFrameSection() { return DebugFrameSection; }
- virtual const Section &getLineSection() { return LineSection; }
- virtual const Section &getLineDWOSection() { return LineDWOSection; }
- virtual StringRef getStringSection() { return StringSection; }
- virtual StringRef getRangeSection() { return RangeSection; }
- virtual StringRef getPubNamesSection() { return PubNamesSection; }
- virtual StringRef getPubTypesSection() { return PubTypesSection; }
- virtual StringRef getGnuPubNamesSection() { return GnuPubNamesSection; }
- virtual StringRef getGnuPubTypesSection() { return GnuPubTypesSection; }
+ bool isLittleEndian() const override { return IsLittleEndian; }
+ uint8_t getAddressSize() const override { return AddressSize; }
+ const Section &getInfoSection() override { return InfoSection; }
+ const TypeSectionMap &getTypesSections() override { return TypesSections; }
+ StringRef getAbbrevSection() override { return AbbrevSection; }
+ const Section &getLocSection() override { return LocSection; }
+ StringRef getARangeSection() override { return ARangeSection; }
+ StringRef getDebugFrameSection() override { return DebugFrameSection; }
+ const Section &getLineSection() override { return LineSection; }
+ const Section &getLineDWOSection() override { return LineDWOSection; }
+ StringRef getStringSection() override { return StringSection; }
+ StringRef getRangeSection() override { return RangeSection; }
+ StringRef getPubNamesSection() override { return PubNamesSection; }
+ StringRef getPubTypesSection() override { return PubTypesSection; }
+ StringRef getGnuPubNamesSection() override { return GnuPubNamesSection; }
+ StringRef getGnuPubTypesSection() override { return GnuPubTypesSection; }
// Sections for DWARF5 split dwarf proposal.
- virtual const Section &getInfoDWOSection() { return InfoDWOSection; }
- virtual const TypeSectionMap &getTypesDWOSections() {
+ const Section &getInfoDWOSection() override { return InfoDWOSection; }
+ const TypeSectionMap &getTypesDWOSections() override {
return TypesDWOSections;
}
- virtual StringRef getAbbrevDWOSection() { return AbbrevDWOSection; }
- virtual StringRef getStringDWOSection() { return StringDWOSection; }
- virtual StringRef getStringOffsetDWOSection() {
+ StringRef getAbbrevDWOSection() override { return AbbrevDWOSection; }
+ StringRef getStringDWOSection() override { return StringDWOSection; }
+ StringRef getStringOffsetDWOSection() override {
return StringOffsetDWOSection;
}
- virtual StringRef getRangeDWOSection() { return RangeDWOSection; }
- virtual StringRef getAddrSection() {
+ StringRef getRangeDWOSection() override { return RangeDWOSection; }
+ StringRef getAddrSection() override {
return AddrSection;
}
};
diff --git a/lib/DebugInfo/DWARFDebugFrame.cpp b/lib/DebugInfo/DWARFDebugFrame.cpp
index d5f1f19658..b268f30015 100644
--- a/lib/DebugInfo/DWARFDebugFrame.cpp
+++ b/lib/DebugInfo/DWARFDebugFrame.cpp
@@ -214,7 +214,7 @@ public:
~CIE() {
}
- void dumpHeader(raw_ostream &OS) const {
+ void dumpHeader(raw_ostream &OS) const override {
OS << format("%08x %08x %08x CIE",
(uint32_t)Offset, (uint32_t)Length, DW_CIE_ID)
<< "\n";
@@ -258,7 +258,7 @@ public:
~FDE() {
}
- void dumpHeader(raw_ostream &OS) const {
+ void dumpHeader(raw_ostream &OS) const override {
OS << format("%08x %08x %08x FDE ",
(uint32_t)Offset, (uint32_t)Length, (int32_t)LinkedCIEOffset);
OS << format("cie=%08x pc=%08x...%08x\n",
diff --git a/lib/DebugInfo/DWARFDebugLine.h b/lib/DebugInfo/DWARFDebugLine.h
index 88b1aee922..a336f49b29 100644
--- a/lib/DebugInfo/DWARFDebugLine.h
+++ b/lib/DebugInfo/DWARFDebugLine.h
@@ -231,7 +231,7 @@ public:
struct DumpingState : public State {
DumpingState(raw_ostream &OS) : OS(OS) {}
virtual ~DumpingState();
- virtual void finalize();
+ void finalize() override;
private:
raw_ostream &OS;
};
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 9160e2661b..e8f2b3bb6f 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -87,7 +87,7 @@ public:
private:
Type *getImpl(Type *T);
/// remapType - Implement the ValueMapTypeRemapper interface.
- Type *remapType(Type *SrcTy) {
+ Type *remapType(Type *SrcTy) override {
return get(SrcTy);
}
@@ -372,7 +372,7 @@ namespace {
LazilyLinkFunctions(LazilyLinkFunctions) {
}
- virtual Value *materializeValueFor(Value *V);
+ Value *materializeValueFor(Value *V) override;
};
/// ModuleLinker - This is an implementation class for the LinkModules