summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-02-26 20:05:02 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-02-26 20:05:02 +0000
commit87e23e57339d62733a68de452ea65873a25b4d30 (patch)
treeb356c70caffc0c175e793ccfc829c236cc9daa7e
parent5b64034a435d2bd25813918bdb1f7368e2af77b7 (diff)
downloadbcm5719-llvm-87e23e57339d62733a68de452ea65873a25b4d30.tar.gz
bcm5719-llvm-87e23e57339d62733a68de452ea65873a25b4d30.zip
[GlobalISel] Fix a ranlib warning about empty TOC.
Fixes PR26733 llvm-svn: 262057
-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