]> granicus.if.org Git - clang/commitdiff
Unfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 10 Oct 2014 13:57:57 +0000 (13:57 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 10 Oct 2014 13:57:57 +0000 (13:57 +0000)
Also remove some unnecessary virtual keywords. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CodeGenFunction.h

index ce227ffc4b394615485ffc1f49cc4d1b0d8731bf..08b2dad1022fce6f42e04cf4c3edf93b98a86754 100644 (file)
@@ -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(
index 0bef47810480b4c8fc4533cfe4cdf4872717a983..f20b758a3b4ee67f4b34899f4e00fd3a3bd45389 100644 (file)
@@ -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.