Go to file
Siva Chandra 0f404e0575 [IRForTarget] Strenghten handling of alternate mangling.
Summary:
This fixes an issue with GCC generated binaries wherein an expression
with method invocations on std::string variables was failing. Such use
cases are tested in TestSTL (albeit, in a test marked with
@unittest2.expectedFailure because of other reasons).

The reason for this particular failure with GCC is that the generated
DWARF for std::basic_string<...> is incomplete, which makes clang not
to use the alternate mangling scheme. GCC correctly generates the name
of basic_string<...>:

DW_AT_name "basic_string<char, std::char_traits<char>, std::allocator<char> >"

It also lists the template parameters of basic_string correctly:

DW_TAG_template_type_parameter
    DW_AT_name                  "_CharT"
    DW_AT_type                  <0x0000009c>
DW_TAG_template_type_parameter
    DW_AT_name                  "_Traits"
    DW_AT_type                  <0x00000609>
DW_TAG_template_type_parameter
    DW_AT_name                  "_Alloc"
    DW_AT_type                  <0x000007fb>

However, it does not list the template parameters of std::char_traits<>.
This makes Clang feel (while parsing the expression) that the string
variable is not actually a basic_string instance, and consequently does
not use the alternate mangling scheme.

Test Plan:
dotest.py -C gcc -p TestSTL
          -- See it go past the "for" loop expression successfully.

Reviewers: clayborg, spyffe

Reviewed By: clayborg, spyffe

Subscribers: tberghammer, zturner, lldb-commits

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

llvm-svn: 234522
2015-04-09 18:48:34 +00:00
clang [ASan] Don't link against libc++abi when not using libc++ 2015-04-09 18:47:01 +00:00
clang-tools-extra [clang-tidy] Ignore expressions with incompatible deleters. 2015-04-09 17:51:01 +00:00
compiler-rt [ASan/Win] Add a test that makes sure coverage works at least in the simple cases 2015-04-09 15:58:38 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement atanh builtin 2015-04-07 16:20:22 +00:00
libcxx In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented. 2015-04-07 05:21:38 +00:00
libcxxabi [libcxxabi] Disallow Base to Derived conversions for catching pointers to members. 2015-04-06 23:03:01 +00:00
lld [ARM] clang-format ARM sources 2015-04-09 10:17:22 +00:00
lldb [IRForTarget] Strenghten handling of alternate mangling. 2015-04-09 18:48:34 +00:00
llgo [llgo] add buildbot-slave config 2015-04-08 01:41:46 +00:00
llvm clang-format bits of code to make a followup patch easy to read. 2015-04-09 18:32:58 +00:00
openmp Replace some unsafe API calls with safe alternatives on Windows, prepare code for similar actions on other platforms - wrap unsafe API calls into macros. 2015-04-02 13:27:08 +00:00
polly Do not recommend -polly-vectorizer=polly 2015-04-09 12:10:36 +00:00