summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp b/llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp
index 02cfde832e1..cc509ff1e87 100644
--- a/llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/EmptyFile.cpp
@@ -14,8 +14,11 @@
#include "llvm/Support/Compiler.h"
-// Anonymous namespace so that we do not step on anyone's toes.
-namespace {
-LLVM_ATTRIBUTE_UNUSED void foo(void) {
+
+namespace llvm {
+// Export a global symbol so that ranlib does not complain
+// about the TOC being empty for the global-isel library when
+// we do not build global-isel.
+LLVM_ATTRIBUTE_UNUSED void DummyFunctionToSilenceRanlib(void) {
}
}
OpenPOWER on IntegriCloud