summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-09-10 00:24:40 +0000
committerHans Wennborg <hans@hanshq.net>2015-09-10 00:24:40 +0000
commit60f3e1f466c9dfa834ab9e71ae4fe0589a42774f (patch)
treeff5497a3955ffa654477b6a91b4e593b60e56084 /clang/lib/CodeGen
parent34d7a7493da92026aca5395f930cabd98354ef95 (diff)
downloadbcm5719-llvm-60f3e1f466c9dfa834ab9e71ae4fe0589a42774f.tar.gz
bcm5719-llvm-60f3e1f466c9dfa834ab9e71ae4fe0589a42774f.zip
Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D12741 llvm-svn: 247218
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntime.cpp13
-rw-r--r--clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp6
2 files changed, 9 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index a0b3ee5ab01..572fd193856 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -59,7 +59,7 @@ public:
virtual const VarDecl *getThreadIDVariable() const = 0;
/// \brief Emit the captured statement body.
- virtual void EmitBody(CodeGenFunction &CGF, const Stmt *S) override;
+ void EmitBody(CodeGenFunction &CGF, const Stmt *S) override;
/// \brief Get an LValue for the current ThreadID variable.
/// \return LValue for thread id variable. This LValue always has type int32*.
@@ -156,7 +156,7 @@ public:
return OuterRegionInfo->getContextValue();
llvm_unreachable("No context value for inlined OpenMP region");
}
- virtual void setContextValue(llvm::Value *V) override {
+ void setContextValue(llvm::Value *V) override {
if (OuterRegionInfo) {
OuterRegionInfo->setContextValue(V);
return;
@@ -229,7 +229,7 @@ public:
}
};
-} // namespace
+} // anonymous namespace
LValue CGOpenMPRegionInfo::getThreadIDVariableLValue(CodeGenFunction &CGF) {
return CGF.MakeNaturalAlignAddrLValue(
@@ -1283,7 +1283,7 @@ public:
CGF.EmitRuntimeCall(Callee, Args);
}
};
-} // namespace
+} // anonymous namespace
void CGOpenMPRuntime::emitCriticalRegion(CodeGenFunction &CGF,
StringRef CriticalName,
@@ -1831,7 +1831,7 @@ enum KmpTaskTFields {
/// \brief Function with call of destructors for private variables.
KmpTaskTDestructors,
};
-} // namespace
+} // anonymous namespace
void CGOpenMPRuntime::emitKmpRoutineEntryT(QualType KmpInt32Ty) {
if (!KmpRoutineEntryPtrTy) {
@@ -1866,7 +1866,7 @@ struct PrivateHelpersTy {
const VarDecl *PrivateElemInit;
};
typedef std::pair<CharUnits /*Align*/, PrivateHelpersTy> PrivateDataTy;
-} // namespace
+} // anonymous namespace
static RecordDecl *
createPrivatesRecordDecl(CodeGenModule &CGM,
@@ -2910,4 +2910,3 @@ void CGOpenMPRuntime::emitCancelCall(CodeGenFunction &CGF, SourceLocation Loc,
}
}
}
-
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index 54a38308694..a850c5ae39d 100644
--- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -30,6 +30,7 @@
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/TargetRegistry.h"
#include <memory>
+
using namespace clang;
#define DEBUG_TYPE "pchcontainer"
@@ -139,7 +140,7 @@ public:
CodeGenOpts.SplitDwarfFile = OutputFileName;
}
- virtual ~PCHContainerGenerator() {}
+ ~PCHContainerGenerator() override = default;
void Initialize(ASTContext &Context) override {
assert(!Ctx && "initialized multiple times");
@@ -254,7 +255,7 @@ public:
}
};
-} // namespace
+} // anonymous namespace
std::unique_ptr<ASTConsumer>
ObjectFilePCHContainerWriter::CreatePCHContainerGenerator(
@@ -290,5 +291,4 @@ void ObjectFilePCHContainerReader::ExtractPCH(
// As a fallback, treat the buffer as a raw AST.
StreamFile.init((const unsigned char *)Buffer.getBufferStart(),
(const unsigned char *)Buffer.getBufferEnd());
- return;
}
OpenPOWER on IntegriCloud