]> granicus.if.org Git - llvm/commitdiff
Remove extra argument used once on TargetMachine::getNameWithPrefix and inline the...
authorEric Christopher <echristo@gmail.com>
Tue, 20 Sep 2016 16:04:50 +0000 (16:04 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 20 Sep 2016 16:04:50 +0000 (16:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281981 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetMachine.h
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/Target/TargetMachine.cpp

index a01f4dbbf5b438fb129d010e3aab360c8995ee3f..667d54373cdb96c9ceff4cc9fd2f368eb9234731 100644 (file)
@@ -265,7 +265,7 @@ public:
   virtual bool targetSchedulesPostRAScheduling() const { return false; };
 
   void getNameWithPrefix(SmallVectorImpl<char> &Name, const GlobalValue *GV,
-                         Mangler &Mang, bool MayAlwaysUsePrivate = false) const;
+                         Mangler &Mang) const;
   MCSymbol *getSymbol(const GlobalValue *GV, Mangler &Mang) const;
 
   /// True if the target uses physical regs at Prolog/Epilog insertion
index bbeb55525277554c4c604b273ccfdfee30d399d3..b92ffde231981f09eeb5e0ad1ee71f453243b4bd 100644 (file)
@@ -296,7 +296,7 @@ selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV,
 
   if (EmitUniqueSection && UniqueSectionNames) {
     Name.push_back('.');
-    TM.getNameWithPrefix(Name, GV, Mang, true);
+    Mang.getNameWithPrefix(Name, GV, false);
   }
   unsigned UniqueID = MCContext::GenericSectionID;
   if (EmitUniqueSection && !UniqueSectionNames) {
index 17caed973910a2269bf8506d89310135ecacfbe8..47c5a56ce09ce3d2283fc69881b605d47a7a1b53 100644 (file)
@@ -199,9 +199,8 @@ TargetIRAnalysis TargetMachine::getTargetIRAnalysis() {
 }
 
 void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name,
-                                      const GlobalValue *GV, Mangler &Mang,
-                                      bool MayAlwaysUsePrivate) const {
-  if (MayAlwaysUsePrivate || !GV->hasPrivateLinkage()) {
+                                      const GlobalValue *GV, Mangler &Mang) const {
+  if (!GV->hasPrivateLinkage()) {
     // Simple case: If GV is not private, it is not important to find out if
     // private labels are legal in this case or not.
     Mang.getNameWithPrefix(Name, GV, false);