Mangle predefined string constants names to merge them at link-time
authorAlexey Samsonov <vonosmas@gmail.com>
Thu, 5 Jun 2014 20:53:34 +0000 (20:53 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Thu, 5 Jun 2014 20:53:34 +0000 (20:53 +0000)
commit8f4f1cf7785e1707706824b9f2127c939791e736
tree29ce245103d8a2a1b1fb16e4bc084bf5e4b12158
parent8eb1d322e273b0507543465ef7a8392cf12a34cc
Mangle predefined string constants names to merge them at link-time

Summary:
This change generalizes the code used to create global LLVM
variables referencing predefined strings (e.g. __FUNCTION__): now it
just calls GetAddrOfConstantStringFromLiteral method. As a result,
global variables for these predefined strings may get mangled names
and linkonce_odr linkage. Fix the test accordingly.

Test Plan: clang regression tests

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4023

llvm-svn: 210284
clang/lib/CodeGen/CGExpr.cpp
clang/test/CodeGenCXX/ms_wide_predefined_expr.cpp