summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp')
-rw-r--r--llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp b/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp
index 711760b2479..55f3320f640 100644
--- a/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp
+++ b/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp
@@ -14,12 +14,10 @@
//
//===----------------------------------------------------------------------===//
-#include <cstring>
-
-namespace {
+#include <string.h>
// Must declare the symbols in the global namespace.
-void *DoSearch(const char* symbolName) {
+static void *DoSearch(const char* symbolName) {
#define EXPLICIT_SYMBOL(SYM) \
extern void *SYM; if (!strcmp(symbolName, #SYM)) return &SYM
@@ -53,12 +51,8 @@ void *DoSearch(const char* symbolName) {
return nullptr;
}
-} // end anonymous namespace
-
namespace llvm {
-
void *SearchForAddressOfSpecialSymbol(const char* symbolName) {
return DoSearch(symbolName);
}
-
-} // end namespace llvm
+} // namespace llvm
OpenPOWER on IntegriCloud