]> granicus.if.org Git - clang/commitdiff
More class anonymization.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 22 Oct 2010 16:48:22 +0000 (16:48 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 22 Oct 2010 16:48:22 +0000 (16:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGRTTI.cpp
lib/Rewrite/FrontendActions.cpp

index bc4059593f5a14a783df656364b683ba50217fd7..478b95ae3996e632143cfbd3866a262080fb9b84 100644 (file)
@@ -688,6 +688,7 @@ static void EmitNewInitializer(CodeGenFunction &CGF, const CXXNewExpr *E,
   StoreAnyExprIntoOneUnit(CGF, E, NewPtr);
 }
 
+namespace {
 /// A utility class for saving an rvalue.
 class SavedRValue {
 public:
@@ -727,6 +728,7 @@ public:
   Kind getKind() const { return K; }
   llvm::Value *getValue() const { return Value; }
 };
+} // end anonymous namespace
 
 /// Given an r-value, perform the code necessary to make sure that a
 /// future RestoreRValue will be able to load the value without
index ef12cd844c33667a2d47cba852cddbd836f2509d..f45cd164d43f9e12a630c3e2d85600800b8273a8 100644 (file)
@@ -39,6 +39,7 @@ using llvm::Value;
 //                         Scalar Expression Emitter
 //===----------------------------------------------------------------------===//
 
+namespace {
 struct BinOpInfo {
   Value *LHS;
   Value *RHS;
@@ -47,7 +48,6 @@ struct BinOpInfo {
   const Expr *E;      // Entire expr, for error unsupported.  May not be binop.
 };
 
-namespace {
 class ScalarExprEmitter
   : public StmtVisitor<ScalarExprEmitter, Value*> {
   CodeGenFunction &CGF;
index 60c3a5f84b9781d0db1db634502de066e284b9ee..2659bd0821a5b0b277477d7b3417df36005a3154 100644 (file)
@@ -695,12 +695,14 @@ void RTTIBuilder::BuildSIClassTypeInfo(const CXXRecordDecl *RD) {
   Fields.push_back(BaseTypeInfo);
 }
 
-/// SeenBases - Contains virtual and non-virtual bases seen when traversing
-/// a class hierarchy.
-struct SeenBases {
-  llvm::SmallPtrSet<const CXXRecordDecl *, 16> NonVirtualBases;
-  llvm::SmallPtrSet<const CXXRecordDecl *, 16> VirtualBases;
-};
+namespace {
+  /// SeenBases - Contains virtual and non-virtual bases seen when traversing
+  /// a class hierarchy.
+  struct SeenBases {
+    llvm::SmallPtrSet<const CXXRecordDecl *, 16> NonVirtualBases;
+    llvm::SmallPtrSet<const CXXRecordDecl *, 16> VirtualBases;
+  };
+}
 
 /// ComputeVMIClassTypeInfoFlags - Compute the value of the flags member in
 /// abi::__vmi_class_type_info.
index 977e0cfba6d07e203fc417428c838d2f112d536f..f8f1efa2952bf29219fc591f06d4c5a8c6498169 100644 (file)
@@ -42,6 +42,7 @@ ASTConsumer *FixItAction::CreateASTConsumer(CompilerInstance &CI,
   return new ASTConsumer();
 }
 
+namespace {
 class FixItRewriteInPlace : public FixItOptions {
 public:
   std::string RewriteFilename(const std::string &Filename) { return Filename; }
@@ -64,6 +65,7 @@ public:
     return Path.c_str();
   }
 };
+} // end anonymous namespace
 
 bool FixItAction::BeginSourceFileAction(CompilerInstance &CI,
                                         llvm::StringRef Filename) {