Refactor and generalize GetAddrOfConstantString and GetAddrOfConstantStringFromLiteral.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 4 Jun 2014 19:56:57 +0000 (19:56 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 4 Jun 2014 19:56:57 +0000 (19:56 +0000)
commit175e52f57b7d6effa19b96b05c962c37a8759917
tree3851a5005e59a898d60cb419232fff9da17825e6
parentff0aff3cafd89359ddf9ddab466646309cec0855
Refactor and generalize GetAddrOfConstantString and GetAddrOfConstantStringFromLiteral.

Share mode code between these functions and re-structure them in a way
which shows how similar they actually are. The latter function works well
with literals of multi-byte chars and does a GlobalVariable name mangling
(if global strings are non-writable).

No functionality change.

llvm-svn: 210212
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h