[llvm] r273461 - [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 12:50:42 PDT 2016
Author: davide
Date: Wed Jun 22 14:50:42 2016
New Revision: 273461
URL: http://llvm.org/viewvc/llvm-project?rev=273461&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h
llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp
Modified: llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h?rev=273461&r1=273460&r2=273461&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h (original)
+++ llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h Wed Jun 22 14:50:42 2016
@@ -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
Modified: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOCodeGenerator.cpp?rev=273461&r1=273460&r2=273461&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp Wed Jun 22 14:50:42 2016
@@ -455,7 +455,7 @@ void LTOCodeGenerator::applyScopeRestric
// 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);
Modified: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=273461&r1=273460&r2=273461&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp Wed Jun 22 14:50:42 2016
@@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/LTO/ThinLTOCodeGenerator.h"
-#include "llvm/LTO/UpdateCompilerUsed.h"
#ifdef HAVE_LLVM_REVISION
#include "LLVMLTORevision.h"
Modified: llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp?rev=273461&r1=273460&r2=273461&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp (original)
+++ llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp Wed Jun 22 14:50:42 2016
@@ -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)
More information about the llvm-commits
mailing list