Include translation unit filename in global ctor symbol names.

This makes it easier to see where a global ctor comes from, and it also makes
ASan's init order analyzer output easier to understand.  gcc does this too,
but only in -fPIC mode for some reason.  Don't do this for constructors with
explicit init priority.

Also prepend "sub_" before the 'I', that way regular constructors stay
lexicographically after symbols with init priority (because
ord('s') > ord('I')).  gold seems to ignore the name of constructor symbols,
and ld only looks at the symbol if it includes an init priority, which this
patch doesn't change.

Before: __GLOBAL_I_a
Now: __GLOBAL_sub_I_myfile.cc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208128 91177308-0d34-0410-b5e6-96231b3b80d8
tblgen: Modularize the diagnostic emitter

Replace a large monolitic function, with per-table functions which all nicely
fit on my screen. I also added documentation to each function that describes
what kind of tables are generated and which information is contained and
switched to range based for loops. Finally, I run clang-format over the moved
code.

I spent a significant amount of time to understand this code when reasoning
about possible extensions to the diagnostic interface to support 'remark'
diagnostics. This change will definitely help such an implementation, but
already by itself it will save other people a lot of time when trying to
understand this functionality.

Even though the patch touches the full function, it is mostly mechanical. No
functional change intended. The generated tblgen files are identical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208136 91177308-0d34-0410-b5e6-96231b3b80d8
Add testcase for r208062.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208138 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Update reference temporary mangling

Summary:
Update our mangling to match the discussion on cxx-abi-dev.

This involves using a seq-id instead of an optional number.

Reviewers: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208140 91177308-0d34-0410-b5e6-96231b3b80d8
Rename "secondary initializer" -> "convenience initializer" in the warnings, which is a more correct and consistent term.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208142 91177308-0d34-0410-b5e6-96231b3b80d8
Try harder to ensure a strict weak ordering of overload candidates that
have arity mismatches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208146 91177308-0d34-0410-b5e6-96231b3b80d8
Clean up some existing keyword tests in the test/Lexer directory by using the
pre-defined __is_identifier() macro.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208147 91177308-0d34-0410-b5e6-96231b3b80d8
If an instantiation of a template is required to be a complete type, check
whether the definition of the template is visible rather than checking whether
the instantiated definition happens to be in an imported module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208150 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Functions marked __attribute__((const)) don't modify any memory.

This applies to __attribute__((pure)) as well, but 'const' is more interesting
because many of our builtins are marked 'const'.

PR19661

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208154 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Use a lazily-initialized BugType in ObjCSelfInitChecker.

Follow-up to Nico's leak-stopping patch in r208110.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208155 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Temporarily disable test parallel_codegen.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208156 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing tests to account for LLVM r208159.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208160 91177308-0d34-0410-b5e6-96231b3b80d8
PR19562: Fix memory leak when ObjC interface types cause the creation of further interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208161 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Fixed problem with temp removal on some platforms in codegen for '#pragma omp parallel'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208162 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Use 'nullptr'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208163 91177308-0d34-0410-b5e6-96231b3b80d8
Fix up indentation and fix an 80 column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208164 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Fixed checking for mangled names in parallel_codegen.cpp test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208165 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix bad space before braced initializer.

Before:
  new int {1};

After:
  new int{1};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208168 91177308-0d34-0410-b5e6-96231b3b80d8
Also recognize Big Endian ARM variants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208169 91177308-0d34-0410-b5e6-96231b3b80d8
Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.
Don't bother with keeping the old support for x86_64 in 6.99.23+, just
use a single range. Update test cases for the always-on --eh-frame-hdr.


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