diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-07-29 19:15:51 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-07-29 19:15:51 +0000 |
commit | 369f4d64a2ab939b872d601c92f66cc6c9837cd5 (patch) | |
tree | 16c77ee44a3d4cd3ab8bf75315619f29d28e971d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 455460f3107a7d29afc0a3609828a9673c82cd5e (diff) | |
download | bcm5719-llvm-369f4d64a2ab939b872d601c92f66cc6c9837cd5.tar.gz bcm5719-llvm-369f4d64a2ab939b872d601c92f66cc6c9837cd5.zip |
CodeGen: try harder to make the CFString structure RW
The previous change was insufficient to mark the content as read-write as the
structure itself was marked constant. Adjust this and add tests to ensure that
the section is marked appropriately as being read-write.
llvm-svn: 277200
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 2affa57ca11..888af29d403 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3209,7 +3209,7 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { // The struct. C = llvm::ConstantStruct::get(STy, Fields); - GV = new llvm::GlobalVariable(getModule(), C->getType(), true, + GV = new llvm::GlobalVariable(getModule(), C->getType(), /*isConstant=*/false, llvm::GlobalVariable::PrivateLinkage, C, "_unnamed_cfstring_"); GV->setAlignment(Alignment.getQuantity()); |