[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 <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
This commit is contained in:
Davide Italiano 2016-06-22 19:50:42 +00:00
parent 9e588d89c5
commit e93d6b14f7
4 changed files with 4 additions and 7 deletions

View 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

View 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);

View File

@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/LTO/ThinLTOCodeGenerator.h"
#include "llvm/LTO/UpdateCompilerUsed.h"
#ifdef HAVE_LLVM_REVISION
#include "LLVMLTORevision.h"

View 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)