]> granicus.if.org Git - llvm/commitdiff
[ThinLTO] Rename doPromoteLocalToGlobal to shouldPromoteLocalToGlobal (NFC)
authorTeresa Johnson <tejohnson@google.com>
Sat, 29 Oct 2016 21:52:23 +0000 (21:52 +0000)
committerTeresa Johnson <tejohnson@google.com>
Sat, 29 Oct 2016 21:52:23 +0000 (21:52 +0000)
Rename as suggested in code review for D26063.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285508 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/FunctionImportUtils.h
lib/Transforms/Utils/FunctionImportUtils.cpp

index ffd8e6ace1b68e023e60fdb18410e579f080d0c3..57b7d0fcd7cc54531a2c495d7a6a1fac2b9712f6 100644 (file)
@@ -41,7 +41,7 @@ class FunctionImportGlobalProcessing {
   bool HasExportedFunctions = false;
 
   /// Check if we should promote the given local value to global scope.
-  bool doPromoteLocalToGlobal(const GlobalValue *SGV);
+  bool shouldPromoteLocalToGlobal(const GlobalValue *SGV);
 
   /// Helper methods to check if we are importing from or potentially
   /// exporting from the current source module.
index f1af20a62acf15779750dd54a58660358f5d719e..d14920575a4c732b2643852b55c4b2da90db5a53 100644 (file)
@@ -48,7 +48,7 @@ bool FunctionImportGlobalProcessing::doImportAsDefinition(
                                                               GlobalsToImport);
 }
 
-bool FunctionImportGlobalProcessing::doPromoteLocalToGlobal(
+bool FunctionImportGlobalProcessing::shouldPromoteLocalToGlobal(
     const GlobalValue *SGV) {
   assert(SGV->hasLocalLinkage());
   // Both the imported references and the original local variable must
@@ -193,9 +193,9 @@ FunctionImportGlobalProcessing::getLinkage(const GlobalValue *SGV,
 void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
   bool DoPromote = false;
   if (GV.hasLocalLinkage() &&
-      ((DoPromote = doPromoteLocalToGlobal(&GV)) || isPerformingImport())) {
+      ((DoPromote = shouldPromoteLocalToGlobal(&GV)) || isPerformingImport())) {
     // Once we change the name or linkage it is difficult to determine
-    // again whether we should promote since doPromoteLocalToGlobal needs
+    // again whether we should promote since shouldPromoteLocalToGlobal needs
     // to locate the summary (based on GUID from name and linkage). Therefore,
     // use DoPromote result saved above.
     GV.setName(getName(&GV, DoPromote));