CodeGen: Make string tests exercise the MS ABI

r204562 unwittingly failed tests for some bots.  Make those tests work
with both the Itanium and MS ABIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204566 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp by forcing VFTableBuilder invocation with virtual function calls or constructors codegen

Previously the vftables were built at the end of the TU in a reverse-to-random order

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204567 91177308-0d34-0410-b5e6-96231b3b80d8
When we inject a declaration into a namespace, add the primary DeclContext to
the update set rather than the current DeclContext. Add test for the local
extern case too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204568 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup dead assignments reported by scan-build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204569 91177308-0d34-0410-b5e6-96231b3b80d8
If a name is injected into an imported inline namespace without reopening that
namespace, we need to update both the visible names of that namespace and of
its enclosing namespace set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204570 91177308-0d34-0410-b5e6-96231b3b80d8
Consistently dump default template arguments for template parameters as 'TemplateArgument's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204572 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing file from r204570.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204574 91177308-0d34-0410-b5e6-96231b3b80d8
Treat dllimport globals without explicit storage class as extern

dllimport implies a definition which means the 'extern' keyword is optional
when declaring imported variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204576 91177308-0d34-0410-b5e6-96231b3b80d8
Fix tests in r204576

Proper redeclaration warnings for dllimport are not implemented yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204577 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204578 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Add tests, other cleanups for r204562

This commit cleans up a few accidents:
- Do not rely on the order in which StringLiteral lays out bytes.
- Use a more efficient mechanism for handling so-called
  "special-mappings" when mangling string literals.
- There is no need to allocate a copy of the mangled name.
- Add the test written for r204562.

Thanks to Richard Smith for pointing these out!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204586 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Remove unneeded directives

Use two check-prefix patterns per FileCheck invocation for these tests,
this cleanly removes redundant CHECK directives.

Thanks to Richard Smith for the idea!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204587 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: Fix a typo in a command line description

Thanks to Richard Smith for catching this!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204588 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r204562,204566,204586,204587 as they broke ASan on Windows

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204596 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a compile-time warning

lib/CodeGen/CGBuiltin.cpp:3136:12: warning: variable ‘TblPos’ set but not used [-Wunused-but-set-variable]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204599 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64_BE test case for predefined macros

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204604 91177308-0d34-0410-b5e6-96231b3b80d8
Update DataLayout/DescriptionString for ppc64le
Update DataLayout/DescriptionString for ppc64le

Similar LLVM change made in r203664

Testcase included.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204613 91177308-0d34-0410-b5e6-96231b3b80d8
Update the parameters passed to the assembler and linker for
the PPC64LE target.  Specifically:
(assembler) adds/uses  -mppc64 -mlittle-endian
(linker) adds/uses  elf64lppc

Testcase included.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204626 91177308-0d34-0410-b5e6-96231b3b80d8
[PPC64LE] Add a CALL_ELF macro to indicate use of the ELFv2 ABI.

Additional clarification from Uli for the background on _CALL_ELF:
"Historically GCC has provided various _CALL_... predefines depending on the
ABI currently being compiled for. (_CALL_SYSV,_CALL_AIXDESC, _CALL_DARWIN )
When we needed a new define for the current ABI, we decided on using _CALL_ELF
since the official name of the ABI is the OpenPower ElfV2 ABI, with the
current Linux ABI retro-actively being renamed the ELFv1 ABI
and so we decided on using _CALL_ELF to identify the Linux (+BSD etc.) ELF ABI,
with _CALL_ELF=1 for the v1 ABI and _CALL_ELF=2 for the v2 ABI.
(Note that this matches the gcc compiler switch -mabi=elfv1 vs. -mabi=elfv2)."

In code, a (_CALL_ELF==2) check will indicate when the ELFv2 ABI is
to be used.   This is the desired default for the PPC64 LE target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204627 91177308-0d34-0410-b5e6-96231b3b80d8
Use CHECK-DAG in a test so that it isn't sensitive to metadata order.

This was failing on an internal branch where the order was different for
some reason. <rdar://problem/16407581>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204633 91177308-0d34-0410-b5e6-96231b3b80d8