[llvm-commits] [llvm-gcc-4.2] r129418 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Evan Cheng
evan.cheng at apple.com
Tue Apr 12 17:35:47 PDT 2011
Author: evancheng
Date: Tue Apr 12 19:35:47 2011
New Revision: 129418
URL: http://llvm.org/viewvc/llvm-project?rev=129418&view=rev
Log:
Try to unbreak mingw buildbots.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=129418&r1=129417&r2=129418&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Apr 12 19:35:47 2011
@@ -74,9 +74,11 @@
// These are defined in c-common.c. The weak symbols are for linking non-c
// compilers.
+#ifndef __MINGW32__
int flag_no_builtin __attribute__ ((__weak__)) = 0;
int builtin_function_disabled_p(const char *name) __attribute__ ((__weak__));
int builtin_function_disabled_p(const char *name) { return 0; }
+#endif
}
// Non-zero if bytecode from PCH is successfully read.
@@ -681,6 +683,7 @@
// Disable (partially) loop idiom pass with -fno-builtin*.
TargetLibraryInfo *TLI =
new TargetLibraryInfo(Triple(TheModule->getTargetTriple()));
+#ifndef __MINGW32__
if (flag_no_builtin)
TLI->disableAllFunctions();
else {
@@ -688,6 +691,9 @@
TLI->setUnavailable(LibFunc::memset);
if (builtin_function_disabled_p("memcpy"))
TLI->setUnavailable(LibFunc::memcpy);
+#else
+ TLI->disableAllFunctions();
+#endif
}
PerFunctionPasses->add(TLI);
@@ -765,6 +771,7 @@
// Disable (partially) loop idiom pass with -fno-builtin*.
TargetLibraryInfo *TLI =
new TargetLibraryInfo(Triple(TheModule->getTargetTriple()));
+#ifndef __MINGW32__
if (flag_no_builtin)
TLI->disableAllFunctions();
else {
@@ -773,6 +780,9 @@
if (builtin_function_disabled_p("memcpy"))
TLI->setUnavailable(LibFunc::memcpy);
}
+#else
+ TLI->disableAllFunctions();
+#endif
PerModulePasses->add(TLI);
bool HasPerModulePasses = false;
More information about the llvm-commits
mailing list