summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-06-22 19:50:42 +0000
committerDavide Italiano <davide@freebsd.org>2016-06-22 19:50:42 +0000
commit53d457c615a002b9a013035627fdb7ec6411faea (patch)
treec0a3c28787cb7c1ea16ad021f236e52f84326682
parent30c50f3cea27964f85b53358e38a60fd07642960 (diff)
downloadbcm5719-llvm-53d457c615a002b9a013035627fdb7ec6411faea.tar.gz
bcm5719-llvm-53d457c615a002b9a013035627fdb7ec6411faea.zip
[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. llvm-svn: 273461
-rw-r--r--llvm/include/llvm/LTO/UpdateCompilerUsed.h6
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp2
-rw-r--r--llvm/lib/LTO/ThinLTOCodeGenerator.cpp1
-rw-r--r--llvm/lib/LTO/UpdateCompilerUsed.cpp2
4 files changed, 4 insertions, 7 deletions
diff --git a/llvm/include/llvm/LTO/UpdateCompilerUsed.h b/llvm/include/llvm/LTO/UpdateCompilerUsed.h
index e36fe4c75ce..4be0027e97d 100644
--- a/llvm/include/llvm/LTO/UpdateCompilerUsed.h
+++ b/llvm/include/llvm/LTO/UpdateCompilerUsed.h
@@ -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
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 71107766675..579e055a689 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/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/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index 36c3e2e9096..5c97e4d69e1 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/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/llvm/lib/LTO/UpdateCompilerUsed.cpp b/llvm/lib/LTO/UpdateCompilerUsed.cpp
index 11773082c22..83cdfef507c 100644
--- a/llvm/lib/LTO/UpdateCompilerUsed.cpp
+++ b/llvm/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<const GlobalValue *, 8> UsedValues;
PreserveLibCallsAndAsmUsed(AsmUndefinedRefs, TM, UsedValues)
OpenPOWER on IntegriCloud