Go to file
Rafael Espindola d19f80a0b4 Give explicit sections for string constants used in NSStrings.
Without them they can be merged with non unnamed_addr constants during LTO.
The resulting constant is not unnamed_addr and goes in a different section,
which causes ld64 to crash.

A testcase that would crash before:

* file1.mm:
void g(id notification) {
  [notification valueForKey:@"name"];
}

* file2.cpp:
extern const char js_name_str[] = "name";

* file3.cpp
extern bool JS_GetProperty(const char *name);
extern const char js_name_str[];
bool js_ReportUncaughtException() { JS_GetProperty(js_name_str); }

run

clang file1.mm  -o file1.o -c -w -emit-llvm
clang file2.cpp -o file2.o -c -w -emit-llvm
clang file3.cpp -o file3.o -c -w

ld -dylib -o XUL file1.o file2.o file3.o -undefined dynamic_lookup.

llvm-svn: 199688
2014-01-20 20:33:18 +00:00
clang Give explicit sections for string constants used in NSStrings. 2014-01-20 20:33:18 +00:00
clang-tools-extra [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR. 2014-01-19 13:00:01 +00:00
compiler-rt [msandr] Access app TLS directly in native exec mode. 2014-01-20 13:09:29 +00:00
debuginfo-tests don't use CHECK-NEXT because it may be on the same line. 2013-09-18 23:01:54 +00:00
libclc Fix build broken by LLVM commit r199279 2014-01-20 20:28:48 +00:00
libcxx Fix erroneous test; was failing on darwin-ppc32. Fixes PR18469. 2014-01-18 03:41:54 +00:00
libcxxabi Implement demangling for user-defined operators. 2014-01-06 23:05:04 +00:00
lld [Mips] Specify the type of a symbol table entries in the test assembler 2014-01-18 21:13:05 +00:00
lldb Relax alias test for failing command 2014-01-20 03:45:47 +00:00
llvm Update StackProtector when coloring merges stack slots 2014-01-20 19:49:14 +00:00
openmp For your Christmas hacking pleasure. 2013-12-23 17:28:57 +00:00
polly Adjust test case to changed cloog output 2014-01-19 11:53:51 +00:00