Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"

Seems it broke the Polly build.
From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio:

In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()'
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error:   overriding 'virtual llvm::Init::~Init() noexcept (true)'

llvm-svn: 247222
This commit is contained in:
Hans Wennborg 2015-09-10 00:37:18 +00:00
parent b4e55f3923
commit e89c8c8033
6 changed files with 30 additions and 32 deletions

View File

@ -30,7 +30,6 @@
#include "llvm/Support/TargetParser.h" #include "llvm/Support/TargetParser.h"
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
using namespace clang; using namespace clang;
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
@ -740,7 +739,7 @@ namespace {
template <typename Target> template <typename Target>
class WebAssemblyOSTargetInfo : public OSTargetInfo<Target> { class WebAssemblyOSTargetInfo : public OSTargetInfo<Target> {
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
MacroBuilder &Builder) const final { MacroBuilder &Builder) const override final {
// A common platform macro. // A common platform macro.
if (Opts.POSIXThreads) if (Opts.POSIXThreads)
Builder.defineMacro("_REENTRANT"); Builder.defineMacro("_REENTRANT");
@ -750,7 +749,7 @@ class WebAssemblyOSTargetInfo : public OSTargetInfo<Target> {
} }
// As an optimization, group static init code together in a section. // As an optimization, group static init code together in a section.
const char *getStaticInitSectionSpecifier() const final { const char *getStaticInitSectionSpecifier() const override final {
return ".text.__startup"; return ".text.__startup";
} }
@ -7012,13 +7011,13 @@ private:
Features["simd128"] = true; Features["simd128"] = true;
return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
} }
bool hasFeature(StringRef Feature) const final { bool hasFeature(StringRef Feature) const override final {
return llvm::StringSwitch<bool>(Feature) return llvm::StringSwitch<bool>(Feature)
.Case("simd128", SIMDLevel >= SIMD128) .Case("simd128", SIMDLevel >= SIMD128)
.Default(false); .Default(false);
} }
bool handleTargetFeatures(std::vector<std::string> &Features, bool handleTargetFeatures(std::vector<std::string> &Features,
DiagnosticsEngine &Diags) final { DiagnosticsEngine &Diags) override final {
for (const auto &Feature : Features) { for (const auto &Feature : Features) {
if (Feature == "+simd128") { if (Feature == "+simd128") {
SIMDLevel = std::max(SIMDLevel, SIMD128); SIMDLevel = std::max(SIMDLevel, SIMD128);
@ -7035,7 +7034,7 @@ private:
} }
return true; return true;
} }
bool setCPU(const std::string &Name) final { bool setCPU(const std::string &Name) override final {
return llvm::StringSwitch<bool>(Name) return llvm::StringSwitch<bool>(Name)
.Case("mvp", true) .Case("mvp", true)
.Case("bleeding-edge", true) .Case("bleeding-edge", true)
@ -7043,32 +7042,32 @@ private:
.Default(false); .Default(false);
} }
void getTargetBuiltins(const Builtin::Info *&Records, void getTargetBuiltins(const Builtin::Info *&Records,
unsigned &NumRecords) const final { unsigned &NumRecords) const override final {
Records = BuiltinInfo; Records = BuiltinInfo;
NumRecords = clang::WebAssembly::LastTSBuiltin - Builtin::FirstTSBuiltin; NumRecords = clang::WebAssembly::LastTSBuiltin - Builtin::FirstTSBuiltin;
} }
BuiltinVaListKind getBuiltinVaListKind() const final { BuiltinVaListKind getBuiltinVaListKind() const override final {
// TODO: Implement va_list properly. // TODO: Implement va_list properly.
return VoidPtrBuiltinVaList; return VoidPtrBuiltinVaList;
} }
void getGCCRegNames(const char *const *&Names, void getGCCRegNames(const char *const *&Names,
unsigned &NumNames) const final { unsigned &NumNames) const override final {
Names = nullptr; Names = nullptr;
NumNames = 0; NumNames = 0;
} }
void getGCCRegAliases(const GCCRegAlias *&Aliases, void getGCCRegAliases(const GCCRegAlias *&Aliases,
unsigned &NumAliases) const final { unsigned &NumAliases) const override final {
Aliases = nullptr; Aliases = nullptr;
NumAliases = 0; NumAliases = 0;
} }
bool bool
validateAsmConstraint(const char *&Name, validateAsmConstraint(const char *&Name,
TargetInfo::ConstraintInfo &Info) const final { TargetInfo::ConstraintInfo &Info) const override final {
return false; return false;
} }
const char *getClobbers() const final { return ""; } const char *getClobbers() const override final { return ""; }
bool isCLZForZeroUndef() const final { return false; } bool isCLZForZeroUndef() const override final { return false; }
bool hasInt128Type() const final { return true; } bool hasInt128Type() const override final { return true; }
}; };
const Builtin::Info WebAssemblyTargetInfo::BuiltinInfo[] = { const Builtin::Info WebAssemblyTargetInfo::BuiltinInfo[] = {

View File

@ -59,7 +59,7 @@ public:
virtual const VarDecl *getThreadIDVariable() const = 0; virtual const VarDecl *getThreadIDVariable() const = 0;
/// \brief Emit the captured statement body. /// \brief Emit the captured statement body.
void EmitBody(CodeGenFunction &CGF, const Stmt *S) override; virtual void EmitBody(CodeGenFunction &CGF, const Stmt *S) override;
/// \brief Get an LValue for the current ThreadID variable. /// \brief Get an LValue for the current ThreadID variable.
/// \return LValue for thread id variable. This LValue always has type int32*. /// \return LValue for thread id variable. This LValue always has type int32*.
@ -156,7 +156,7 @@ public:
return OuterRegionInfo->getContextValue(); return OuterRegionInfo->getContextValue();
llvm_unreachable("No context value for inlined OpenMP region"); llvm_unreachable("No context value for inlined OpenMP region");
} }
void setContextValue(llvm::Value *V) override { virtual void setContextValue(llvm::Value *V) override {
if (OuterRegionInfo) { if (OuterRegionInfo) {
OuterRegionInfo->setContextValue(V); OuterRegionInfo->setContextValue(V);
return; return;
@ -229,7 +229,7 @@ public:
} }
}; };
} // anonymous namespace } // namespace
LValue CGOpenMPRegionInfo::getThreadIDVariableLValue(CodeGenFunction &CGF) { LValue CGOpenMPRegionInfo::getThreadIDVariableLValue(CodeGenFunction &CGF) {
return CGF.MakeNaturalAlignAddrLValue( return CGF.MakeNaturalAlignAddrLValue(
@ -1283,7 +1283,7 @@ public:
CGF.EmitRuntimeCall(Callee, Args); CGF.EmitRuntimeCall(Callee, Args);
} }
}; };
} // anonymous namespace } // namespace
void CGOpenMPRuntime::emitCriticalRegion(CodeGenFunction &CGF, void CGOpenMPRuntime::emitCriticalRegion(CodeGenFunction &CGF,
StringRef CriticalName, StringRef CriticalName,
@ -1831,7 +1831,7 @@ enum KmpTaskTFields {
/// \brief Function with call of destructors for private variables. /// \brief Function with call of destructors for private variables.
KmpTaskTDestructors, KmpTaskTDestructors,
}; };
} // anonymous namespace } // namespace
void CGOpenMPRuntime::emitKmpRoutineEntryT(QualType KmpInt32Ty) { void CGOpenMPRuntime::emitKmpRoutineEntryT(QualType KmpInt32Ty) {
if (!KmpRoutineEntryPtrTy) { if (!KmpRoutineEntryPtrTy) {
@ -1866,7 +1866,7 @@ struct PrivateHelpersTy {
const VarDecl *PrivateElemInit; const VarDecl *PrivateElemInit;
}; };
typedef std::pair<CharUnits /*Align*/, PrivateHelpersTy> PrivateDataTy; typedef std::pair<CharUnits /*Align*/, PrivateHelpersTy> PrivateDataTy;
} // anonymous namespace } // namespace
static RecordDecl * static RecordDecl *
createPrivatesRecordDecl(CodeGenModule &CGM, createPrivatesRecordDecl(CodeGenModule &CGM,
@ -2910,3 +2910,4 @@ void CGOpenMPRuntime::emitCancelCall(CodeGenFunction &CGF, SourceLocation Loc,
} }
} }
} }

View File

@ -30,7 +30,6 @@
#include "llvm/Object/ObjectFile.h" #include "llvm/Object/ObjectFile.h"
#include "llvm/Support/TargetRegistry.h" #include "llvm/Support/TargetRegistry.h"
#include <memory> #include <memory>
using namespace clang; using namespace clang;
#define DEBUG_TYPE "pchcontainer" #define DEBUG_TYPE "pchcontainer"
@ -140,7 +139,7 @@ public:
CodeGenOpts.SplitDwarfFile = OutputFileName; CodeGenOpts.SplitDwarfFile = OutputFileName;
} }
~PCHContainerGenerator() override = default; virtual ~PCHContainerGenerator() {}
void Initialize(ASTContext &Context) override { void Initialize(ASTContext &Context) override {
assert(!Ctx && "initialized multiple times"); assert(!Ctx && "initialized multiple times");
@ -255,7 +254,7 @@ public:
} }
}; };
} // anonymous namespace } // namespace
std::unique_ptr<ASTConsumer> std::unique_ptr<ASTConsumer>
ObjectFilePCHContainerWriter::CreatePCHContainerGenerator( ObjectFilePCHContainerWriter::CreatePCHContainerGenerator(
@ -291,4 +290,5 @@ void ObjectFilePCHContainerReader::ExtractPCH(
// As a fallback, treat the buffer as a raw AST. // As a fallback, treat the buffer as a raw AST.
StreamFile.init((const unsigned char *)Buffer.getBufferStart(), StreamFile.init((const unsigned char *)Buffer.getBufferStart(),
(const unsigned char *)Buffer.getBufferEnd()); (const unsigned char *)Buffer.getBufferEnd());
return;
} }

View File

@ -923,7 +923,7 @@ public:
const llvm::opt::ArgList &Args); const llvm::opt::ArgList &Args);
~SHAVEToolChain() override; ~SHAVEToolChain() override;
Tool *SelectTool(const JobAction &JA) const override; virtual Tool *SelectTool(const JobAction &JA) const override;
protected: protected:
Tool *getTool(Action::ActionClass AC) const override; Tool *getTool(Action::ActionClass AC) const override;
@ -960,4 +960,4 @@ private:
} // end namespace driver } // end namespace driver
} // end namespace clang } // end namespace clang
#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_H #endif

View File

@ -606,7 +606,7 @@ public:
/// \brief Puts all tokens into a single line. /// \brief Puts all tokens into a single line.
unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent, unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent,
bool DryRun) override { bool DryRun) {
unsigned Penalty = 0; unsigned Penalty = 0;
LineState State = Indenter->getInitialState(FirstIndent, &Line, DryRun); LineState State = Indenter->getInitialState(FirstIndent, &Line, DryRun);
while (State.NextToken) { while (State.NextToken) {
@ -629,7 +629,7 @@ public:
/// \brief Formats the line by finding the best line breaks with line lengths /// \brief Formats the line by finding the best line breaks with line lengths
/// below the column limit. /// below the column limit.
unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent, unsigned formatLine(const AnnotatedLine &Line, unsigned FirstIndent,
bool DryRun) override { bool DryRun) {
LineState State = Indenter->getInitialState(FirstIndent, &Line, DryRun); LineState State = Indenter->getInitialState(FirstIndent, &Line, DryRun);
// If the ObjC method declaration does not fit on a line, we should format // If the ObjC method declaration does not fit on a line, we should format
@ -791,7 +791,7 @@ private:
llvm::SpecificBumpPtrAllocator<StateNode> Allocator; llvm::SpecificBumpPtrAllocator<StateNode> Allocator;
}; };
} // anonymous namespace } // namespace
unsigned unsigned
UnwrappedLineFormatter::format(const SmallVectorImpl<AnnotatedLine *> &Lines, UnwrappedLineFormatter::format(const SmallVectorImpl<AnnotatedLine *> &Lines,

View File

@ -16,7 +16,6 @@
#include "llvm/Bitcode/BitstreamReader.h" #include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Support/raw_ostream.h" #include "llvm/Support/raw_ostream.h"
#include "clang/Lex/ModuleLoader.h" #include "clang/Lex/ModuleLoader.h"
using namespace clang; using namespace clang;
namespace { namespace {
@ -37,7 +36,7 @@ public:
std::shared_ptr<PCHBuffer> Buffer) std::shared_ptr<PCHBuffer> Buffer)
: Buffer(Buffer), OS(OS) {} : Buffer(Buffer), OS(OS) {}
~RawPCHContainerGenerator() override = default; virtual ~RawPCHContainerGenerator() {}
void HandleTranslationUnit(ASTContext &Ctx) override { void HandleTranslationUnit(ASTContext &Ctx) override {
if (Buffer->IsComplete) { if (Buffer->IsComplete) {
@ -50,8 +49,7 @@ public:
Buffer->Data = std::move(Empty); Buffer->Data = std::move(Empty);
} }
}; };
}
} // anonymous namespace
std::unique_ptr<ASTConsumer> RawPCHContainerWriter::CreatePCHContainerGenerator( std::unique_ptr<ASTConsumer> RawPCHContainerWriter::CreatePCHContainerGenerator(
DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO, DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO,