r199665 - Remove virtual methods that were added in 2009 and still had 1 implementation.

Rafael Espindola rafael.espindola at gmail.com
Mon Jan 20 07:19:43 PST 2014


Author: rafael
Date: Mon Jan 20 09:19:43 2014
New Revision: 199665

URL: http://llvm.org/viewvc/llvm-project?rev=199665&view=rev
Log:
Remove virtual methods that were added in 2009 and still had 1 implementation.

Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=199665&r1=199664&r2=199665&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Mon Jan 20 09:19:43 2014
@@ -605,24 +605,6 @@ public:
   /// either; the entire thing is pretty badly mangled.
   virtual bool hasProtectedVisibility() const { return true; }
 
-  /// \brief Return the section to use for CFString literals, or 0 if no
-  /// special section is used.
-  virtual const char *getCFStringSection() const {
-    return "__DATA,__cfstring";
-  }
-
-  /// \brief Return the section to use for NSString literals, or 0 if no
-  /// special section is used.
-  virtual const char *getNSStringSection() const {
-    return "__OBJC,__cstring_object,regular,no_dead_strip";
-  }
-
-  /// \brief Return the section to use for NSString literals, or 0 if no
-  /// special section is used (NonFragile ABI).
-  virtual const char *getNSStringNonFragileABISection() const {
-    return "__DATA, __objc_stringobj, regular, no_dead_strip";
-  }
-
   /// \brief An optional hook that targets can implement to perform semantic
   /// checking on attribute((section("foo"))) specifiers.
   ///

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=199665&r1=199664&r2=199665&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Jan 20 09:19:43 2014
@@ -2420,8 +2420,8 @@ CodeGenModule::GetAddrOfConstantCFString
   GV = new llvm::GlobalVariable(getModule(), C->getType(), true,
                                 llvm::GlobalVariable::PrivateLinkage, C,
                                 "_unnamed_cfstring_");
-  if (const char *Sect = getTarget().getCFStringSection())
-    GV->setSection(Sect);
+  const char *CFStringSection = "__DATA,__cfstring";
+  GV->setSection(CFStringSection);
   Entry.setValue(GV);
 
   return GV;
@@ -2532,12 +2532,14 @@ CodeGenModule::GetAddrOfConstantString(c
   GV = new llvm::GlobalVariable(getModule(), C->getType(), true,
                                 llvm::GlobalVariable::PrivateLinkage, C,
                                 "_unnamed_nsstring_");
+  const char *NSStringSection = "__OBJC,__cstring_object,regular,no_dead_strip";
+  const char *NSStringNonFragileABISection =
+      "__DATA, __objc_stringobj, regular, no_dead_strip";
   // FIXME. Fix section.
-  if (const char *Sect = 
-        LangOpts.ObjCRuntime.isNonFragile() 
-          ? getTarget().getNSStringNonFragileABISection() 
-          : getTarget().getNSStringSection())
-    GV->setSection(Sect);
+  const char *Sect = LangOpts.ObjCRuntime.isNonFragile()
+                         ? NSStringNonFragileABISection
+                         : NSStringSection;
+  GV->setSection(Sect);
   Entry.setValue(GV);
   
   return GV;





More information about the cfe-commits mailing list