From: Davide Italiano Date: Wed, 22 Jun 2016 19:50:42 +0000 (+0000) Subject: [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e93d6b14f79e40dd33ff131b4d174ba78ff9bd28;p=llvm [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael. * UpdateCompilerUsed() -> updateCompilerUsed() * ThinLTO doesn't use the API so we can remove the include * Clean up unused #include 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 --- diff --git a/include/llvm/LTO/UpdateCompilerUsed.h b/include/llvm/LTO/UpdateCompilerUsed.h index e36fe4c75ce..4be0027e97d 100644 --- a/include/llvm/LTO/UpdateCompilerUsed.h +++ b/include/llvm/LTO/UpdateCompilerUsed.h @@ -17,8 +17,6 @@ #include "llvm/ADT/StringSet.h" #include "llvm/IR/GlobalValue.h" -#include - 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 diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp index 71107766675..579e055a689 100644 --- a/lib/LTO/LTOCodeGenerator.cpp +++ b/lib/LTO/LTOCodeGenerator.cpp @@ -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); diff --git a/lib/LTO/ThinLTOCodeGenerator.cpp b/lib/LTO/ThinLTOCodeGenerator.cpp index 36c3e2e9096..5c97e4d69e1 100644 --- a/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/lib/LTO/ThinLTOCodeGenerator.cpp @@ -13,7 +13,6 @@ //===----------------------------------------------------------------------===// #include "llvm/LTO/ThinLTOCodeGenerator.h" -#include "llvm/LTO/UpdateCompilerUsed.h" #ifdef HAVE_LLVM_REVISION #include "LLVMLTORevision.h" diff --git a/lib/LTO/UpdateCompilerUsed.cpp b/lib/LTO/UpdateCompilerUsed.cpp index 11773082c22..83cdfef507c 100644 --- a/lib/LTO/UpdateCompilerUsed.cpp +++ b/lib/LTO/UpdateCompilerUsed.cpp @@ -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 UsedValues; PreserveLibCallsAndAsmUsed(AsmUndefinedRefs, TM, UsedValues)