r219497 - Unfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.

Benjamin Kramer benny.kra at googlemail.com
Fri Oct 10 06:57:58 PDT 2014


Author: d0k
Date: Fri Oct 10 08:57:57 2014
New Revision: 219497

URL: http://llvm.org/viewvc/llvm-project?rev=219497&view=rev
Log:
Unfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.

Also remove some unnecessary virtual keywords. NFC.

Modified:
    cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp
    cfe/trunk/lib/CodeGen/CodeGenFunction.h

Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp?rev=219497&r1=219496&r2=219497&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Fri Oct 10 08:57:57 2014
@@ -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(

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=219497&r1=219496&r2=219497&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Fri Oct 10 08:57:57 2014
@@ -113,7 +113,6 @@ class CodeGenFunction : public CodeGenTy
   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.





More information about the cfe-commits mailing list