[llvm-commits] [llvm-gcc-4.2] r96000 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Evan Cheng
evan.cheng at apple.com
Fri Feb 12 11:17:58 PST 2010
Author: evancheng
Date: Fri Feb 12 13:17:58 2010
New Revision: 96000
URL: http://llvm.org/viewvc/llvm-project?rev=96000&view=rev
Log:
Unbreak non-darwin builds. Turns out darwin_constant_cfstring_p is darwin only. Who knew.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=96000&r1=95999&r2=96000&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Feb 12 13:17:58 2010
@@ -8383,10 +8383,13 @@
Constant *TreeConstantToLLVM::EmitLV_STRING_CST(tree exp) {
Constant *Init = TreeConstantToLLVM::ConvertSTRING_CST(exp);
- // Support -fwritable-strings. However, ignores it if exp is a CFString and
+ // Support -fwritable-strings.
+ bool StringIsConstant = !flag_writable_strings;
+#ifdef CONFIG_DARWIN_H
+ // However, ignores it if exp is a CFString and
// -fconstant-cfstring (default) is set.
- bool StringIsConstant = !flag_writable_strings ||
- darwin_constant_cfstring_p(exp);
+ StringIsConstant |= darwin_constant_cfstring_p(exp);
+#endif
// Literal cstrings in data section needs a label the linker can
// see to prevent it from being merged into its previous label.
More information about the llvm-commits
mailing list