]> granicus.if.org Git - clang/commitdiff
Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true.
authorAnders Carlsson <andersca@mac.com>
Sat, 29 Jan 2011 05:26:32 +0000 (05:26 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 29 Jan 2011 05:26:32 +0000 (05:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRTTI.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h

index 8af0ecd978bde5be5fc0c78cace39f1a0334e7f0..4ba58c716399bcf9f6523284ce5ebd7650f0444e 100644 (file)
@@ -644,7 +644,7 @@ llvm::Constant *RTTIBuilder::BuildTypeInfo(QualType Ty, bool Force) {
   // compatibility.
   if (const RecordType *RT = dyn_cast<RecordType>(Ty))
     CGM.setTypeVisibility(GV, cast<CXXRecordDecl>(RT->getDecl()),
-                          /*ForRTTI*/ true, /*ForDefinition*/ true);
+                          /*ForRTTI=*/true);
   else if (Hidden || 
            (CGM.getCodeGenOpts().HiddenWeakVTables &&
             Linkage == llvm::GlobalValue::LinkOnceODRLinkage)) {
index 5df3ac52b5afef51fef1efe9289234dd9c04c405..6d8812a3aa85fe7cf93bebaa95821142ed105a0f 100644 (file)
@@ -3019,7 +3019,7 @@ CodeGenVTables::EmitVTableDefinition(llvm::GlobalVariable *VTable,
   VTable->setLinkage(Linkage);
   
   // Set the right visibility.
-  CGM.setTypeVisibility(VTable, RD, /*ForRTTI*/ false, /*ForDef*/ true);
+  CGM.setTypeVisibility(VTable, RD, /*ForRTTI=*/false);
 }
 
 llvm::GlobalVariable *
index ae61661da63a0365a0f23cbcc9d02c1ea688c17a..d2be432bbf8b259cb69e2c60aa1ecbab6c0f130f 100644 (file)
@@ -195,9 +195,8 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
 /// associated with the given type.
 void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV,
                                       const CXXRecordDecl *RD,
-                                      bool IsForRTTI,
-                                      bool IsForDefinition) const {
-  setGlobalVisibility(GV, RD, IsForDefinition);
+                                      bool IsForRTTI) const {
+  setGlobalVisibility(GV, RD, /*IsForDefinition=*/true);
 
   if (!CodeGenOpts.HiddenWeakVTables)
     return;
index f38c0bc018f5fdb6d70dfb957bbd1f415bd34855..bb32fff826847c16f57d6a9ccb2ea1c25d8e87b6 100644 (file)
@@ -265,7 +265,7 @@ public:
   /// setTypeVisibility - Set the visibility for the given global
   /// value which holds information about a type.
   void setTypeVisibility(llvm::GlobalValue *GV, const CXXRecordDecl *D,
-                         bool IsForRTTI, bool IsForDefinition) const;
+                         bool IsForRTTI) const;
 
   llvm::Constant *GetAddrOfGlobal(GlobalDecl GD) {
     if (isa<CXXConstructorDecl>(GD.getDecl()))