[llvm] r262057 - [GlobalISel] Fix a ranlib warning about empty TOC.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 12:05:03 PST 2016
Author: qcolombet
Date: Fri Feb 26 14:05:02 2016
New Revision: 262057
URL: http://llvm.org/viewvc/llvm-project?rev=262057&view=rev
Log:
[GlobalISel] Fix a ranlib warning about empty TOC.
Fixes PR26733
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/EmptyFile.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/EmptyFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/EmptyFile.cpp?rev=262057&r1=262056&r2=262057&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/EmptyFile.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/EmptyFile.cpp Fri Feb 26 14:05:02 2016
@@ -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) {
}
}
More information about the llvm-commits
mailing list