]> granicus.if.org Git - llvm/commitdiff
[UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael.
authorDavide Italiano <davide@freebsd.org>
Wed, 22 Jun 2016 19:50:42 +0000 (19:50 +0000)
committerDavide Italiano <davide@freebsd.org>
Wed, 22 Jun 2016 19:50:42 +0000 (19:50 +0000)
* UpdateCompilerUsed() -> updateCompilerUsed()
* ThinLTO doesn't use the API so we can remove the include
* Clean up unused #include <functional> from the header
* Rename #ifdef guard comment to be correct.

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

include/llvm/LTO/UpdateCompilerUsed.h
lib/LTO/LTOCodeGenerator.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
lib/LTO/UpdateCompilerUsed.cpp

index e36fe4c75ce341a13081fc53008cf03db5b7b700..4be0027e97d7cabc31db534355e8b3812f7bec43 100644 (file)
@@ -17,8 +17,6 @@
 #include "llvm/ADT/StringSet.h"
 #include "llvm/IR/GlobalValue.h"
 
-#include <functional>
-
 namespace llvm {
 class Module;
 class TargetMachine;
@@ -27,8 +25,8 @@ class TargetMachine;
 /// \p AsmUndefinedRefs, as well as the user-supplied functions definitions that
 /// are also libcalls, and create or update the magic "llvm.compiler_used"
 /// global in \p TheModule.
-void UpdateCompilerUsed(Module &TheModule, const TargetMachine &TM,
+void updateCompilerUsed(Module &TheModule, const TargetMachine &TM,
                         const StringSet<> &AsmUndefinedRefs);
 }
 
-#endif // LLVM_LTO_LTOINTERNALIZE_H
+#endif // LLVM_LTO_UPDATE_COMPILER_USED_H
index 711077666750ba6c834a3713dc0a7f834cb808d2..579e055a68993ed18cfb5d8480495c542f77eabd 100644 (file)
@@ -455,7 +455,7 @@ void LTOCodeGenerator::applyScopeRestrictions() {
 
   // Update the llvm.compiler_used globals to force preserving libcalls and
   // symbols referenced from asm
-  UpdateCompilerUsed(*MergedModule, *TargetMach, AsmUndefinedRefs);
+  updateCompilerUsed(*MergedModule, *TargetMach, AsmUndefinedRefs);
 
   internalizeModule(*MergedModule, mustPreserveGV);
 
index 36c3e2e9096598235e3407375f1a772f6e19fcbd..5c97e4d69e1679bfa4a971f6389f53dc1b0769bd 100644 (file)
@@ -13,7 +13,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/LTO/ThinLTOCodeGenerator.h"
-#include "llvm/LTO/UpdateCompilerUsed.h"
 
 #ifdef HAVE_LLVM_REVISION
 #include "LLVMLTORevision.h"
index 11773082c229b5ec131acdab7048c5cdf2e6c85e..83cdfef507c81855ca97296b9763abf2f1a947fb 100644 (file)
@@ -112,7 +112,7 @@ private:
 
 } // namespace anonymous
 
-void llvm::UpdateCompilerUsed(Module &TheModule, const TargetMachine &TM,
+void llvm::updateCompilerUsed(Module &TheModule, const TargetMachine &TM,
                               const StringSet<> &AsmUndefinedRefs) {
   SmallPtrSet<const GlobalValue *, 8> UsedValues;
   PreserveLibCallsAndAsmUsed(AsmUndefinedRefs, TM, UsedValues)