diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-07-09 01:59:51 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-07-09 01:59:51 +0000 |
commit | 0295f8ce3962d12929eed16cde65f4498a2564b5 (patch) | |
tree | f566305fdbf5d7f915fced2eabdd8e4b755b2142 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 3f80043224472bb91971dd3f987a1c212c711376 (diff) | |
download | bcm5719-llvm-0295f8ce3962d12929eed16cde65f4498a2564b5.tar.gz bcm5719-llvm-0295f8ce3962d12929eed16cde65f4498a2564b5.zip |
CodeGen: tweak CFString section for COFF, ELF
Place the structure data into `cfstring`. This both isolates the structures to
permit coalescing in the future (by the linker) as well as ensures that it
doesnt get marked as read-only data. The structures themselves are not
read-only, only the string contents.
llvm-svn: 274956
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c6e20a5f9c7..55b13b4b21b 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3209,10 +3209,8 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { case llvm::Triple::UnknownObjectFormat: llvm_unreachable("unknown file format"); case llvm::Triple::COFF: - GV->setSection(".rdata.cfstring"); - break; case llvm::Triple::ELF: - GV->setSection(".rodata.cfstring"); + GV->setSection("cfstring"); break; case llvm::Triple::MachO: GV->setSection("__DATA,__cfstring"); |