]> granicus.if.org Git - clang/commitdiff
Move helper classes into anonymous namespaces. NFCI.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 15 May 2018 21:26:47 +0000 (21:26 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 15 May 2018 21:26:47 +0000 (21:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332400 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGOpenMPRuntime.cpp
lib/Serialization/ASTReaderDecl.cpp

index 42f1ceac673d578058e5a350a3d95c29d6cc4502..7373331a6382459dd3454c94c337ffc11c055ac6 100644 (file)
@@ -1470,9 +1470,10 @@ createConstantGlobalStruct(CodeGenModule &CGM, QualType Ty,
 }
 
 template <typename T>
-void createConstantGlobalStructAndAddToParent(CodeGenModule &CGM, QualType Ty,
-                                              ArrayRef<llvm::Constant *> Data,
-                                              T &Parent) {
+static void
+createConstantGlobalStructAndAddToParent(CodeGenModule &CGM, QualType Ty,
+                                         ArrayRef<llvm::Constant *> Data,
+                                         T &Parent) {
   const auto *RD = cast<RecordDecl>(Ty->getAsTagDecl());
   const CGRecordLayout &RL = CGM.getTypes().getCGRecordLayout(RD);
   ConstantStructBuilder Fields = Parent.beginStruct(RL.getLLVMType());
index 79465b5c88a1603a6bd6bcb9738898dba7bb4a6c..a1ce26d27ca4e6ea7c0d4f3380eb0668ee7141d2 100644 (file)
@@ -2552,11 +2552,11 @@ void ASTDeclReader::mergeRedeclarable(Redeclarable<T> *DBase, T *Existing,
 /// 6.1.2.6/1). Although most merging is done in Sema, we need to guarantee
 /// that some types are mergeable during deserialization, otherwise name
 /// lookup fails. This is the case for EnumConstantDecl.
-bool allowODRLikeMergeInC(NamedDecl *ND) {
+static bool allowODRLikeMergeInC(NamedDecl *ND) {
   if (!ND)
     return false;
   // TODO: implement merge for other necessary decls.
-  if (dyn_cast<EnumConstantDecl>(ND))
+  if (isa<EnumConstantDecl>(ND))
     return true;
   return false;
 }