summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-10-10 13:57:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-10-10 13:57:57 +0000
commitc52193f4c70dfe7af55cd4e713761895bd20815d (patch)
tree0d606a46aabfdda13c02123aecf5a7d48cf8e96b /clang/lib
parenta1ac4b2f6ae352422b8aa783d48de9884eafb2ad (diff)
downloadbcm5719-llvm-c52193f4c70dfe7af55cd4e713761895bd20815d.tar.gz
bcm5719-llvm-c52193f4c70dfe7af55cd4e713761895bd20815d.zip
Unfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.
Also remove some unnecessary virtual keywords. NFC. llvm-svn: 219497
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntime.cpp11
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h1
2 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index ce227ffc4b3..08b2dad1022 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -25,8 +25,7 @@
using namespace clang;
using namespace CodeGen;
-namespace clang {
-namespace CodeGen {
+namespace {
/// \brief API for captured statement code generation in OpenMP constructs.
class CGOpenMPRegionInfo : public CodeGenFunction::CGCapturedStmtInfo {
public:
@@ -37,8 +36,6 @@ public:
assert(ThreadIDVar != nullptr && "No ThreadID in OpenMP region.");
}
- virtual ~CGOpenMPRegionInfo() override{};
-
/// \brief Gets a variable or parameter for storing global thread id
/// inside OpenMP construct.
const VarDecl *getThreadIDVariable() const { return ThreadIDVar; }
@@ -51,10 +48,10 @@ public:
}
/// \brief Emit the captured statement body.
- virtual void EmitBody(CodeGenFunction &CGF, Stmt *S) override;
+ void EmitBody(CodeGenFunction &CGF, Stmt *S) override;
/// \brief Get the name of the capture helper.
- virtual StringRef getHelperName() const override { return ".omp_outlined."; }
+ StringRef getHelperName() const override { return ".omp_outlined."; }
private:
/// \brief A variable or parameter storing global thread id for OpenMP
@@ -63,7 +60,7 @@ private:
/// \brief OpenMP executable directive associated with the region.
const OMPExecutableDirective &Directive;
};
-}}
+} // namespace
LValue CGOpenMPRegionInfo::getThreadIDVariableLValue(CodeGenFunction &CGF) {
return CGF.MakeNaturalAlignAddrLValue(
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 0bef4781048..f20b758a3b4 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -113,7 +113,6 @@ class CodeGenFunction : public CodeGenTypeCache {
void operator=(const CodeGenFunction &) LLVM_DELETED_FUNCTION;
friend class CGCXXABI;
- friend class CGOpenMPRegionInfo;
public:
/// A jump destination is an abstract label, branching to which may
/// require a jump out through normal cleanups.
OpenPOWER on IntegriCloud