MCDwarf: Extract the DWARF line table header handling into its own type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203856 91177308-0d34-0410-b5e6-96231b3b80d8
MCDwarf: Rename MCDwarfFileTable to MCDwarfLineTable

This type now represents all the data for the DWARF line table:
directory names, file names, and the line table proper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203858 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a bug in InstCombine where we would incorrectly attempt to construct a
bitcast between pointers of two different address spaces if they happened to have
the same pointer size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203862 91177308-0d34-0410-b5e6-96231b3b80d8
Phase 2 of the great MachineRegisterInfo cleanup.  This time, we're changing
operator* on the by-operand iterators to return a MachineOperand& rather than
a MachineInstr&.  At this point they almost behave like normal iterators!

Again, this requires making some existing loops more verbose, but should pave
the way for the big range-based for-loop cleanups in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203865 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the linker_private and linker_private_weak linkages.

These linkages were introduced some time ago, but it was never very
clear what exactly their semantics were or what they should be used
for. Some investigation found these uses:

* utf-16 strings in clang.
* non-unnamed_addr strings produced by the sanitizers.

It turns out they were just working around a more fundamental problem.
For some sections a MachO linker needs a symbol in order to split the
section into atoms, and llvm had no idea that was the case. I fixed
that in r201700 and it is now safe to use the private linkage. When
the object ends up in a section that requires symbols, llvm will use a
'l' prefix instead of a 'L' prefix and things just work.

With that, these linkages were already dead, but there was a potential
future user in the objc metadata information. I am still looking at
CGObjcMac.cpp, but at this point I am convinced that linker_private
and linker_private_weak are not what they need.

The objc uses are currently split in

* Regular symbols (no '\01' prefix). LLVM already directly provides
whatever semantics they need.
* Uses of a private name (start with "\01L" or "\01l") and private
linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm
agrees with clang on L being ok or not for a given section. I have two
patches in code review for this.
* Uses of private name and weak linkage.

The last case is the one that one could think would fit one of these
linkages. That is not the case. The semantics are

* the linker will merge these symbol by *name*.
* the linker will hide them in the final DSO.

Given that the merging is done by name, any of the private (or
internal) linkages would be a bad match. They allow llvm to rename the
symbols, and that is really not what we want. From the llvm point of
view, these objects should really be (linkonce|weak)(_odr)?.

For now, just keeping the "\01l" prefix is probably the best for these
symbols. If we one day want to have a more direct support in llvm,
IMHO what we should add is not a linkage, it is just a hidden_symbol
attribute. It would be applicable to multiple linkages. For example,
on weak it would produce the current behavior we have for objc
metadata. On internal, it would be equivalent to private (and we
should then remove private).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203866 91177308-0d34-0410-b5e6-96231b3b80d8
Use DW_AT_linkage_name when we're emitting DWARF4 or above.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203867 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed misuse of isascii. Also fixes mingw32 build, see http://msdn.microsoft.com/en-us/library/ms235417.aspx

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203880 91177308-0d34-0410-b5e6-96231b3b80d8
Fix issue with r203865.  The old behaviour would get a MachineOperand then find the MI for the bundle the MI was in.  The new behaviour was failing to get the parent bundle and instead just used the MI from the MachineOperand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203883 91177308-0d34-0410-b5e6-96231b3b80d8
static link polly into tools

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203886 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r203883 (which was more of a bandaid) and fix the real underlying
issue in that the new MachineRegisterInfo bundle iterators didn't
dereference to the START of the bundle, while the old skipBundle()
method did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203890 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Add one more MIPS relocation type constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203896 91177308-0d34-0410-b5e6-96231b3b80d8
[yaml2obj][ELF] Assign name (.shstrtab) to the section holds sections names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203897 91177308-0d34-0410-b5e6-96231b3b80d8
[yaml2obj][ELF] Remove unused ELFState class field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203898 91177308-0d34-0410-b5e6-96231b3b80d8
[yaml2obj][ELF] Refer to a section in the error message by its name not
index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203899 91177308-0d34-0410-b5e6-96231b3b80d8
[yaml2obj][ELF] Use range-based for loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203900 91177308-0d34-0410-b5e6-96231b3b80d8
MergeFunctions, cmpType: Fixed comments wrapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203905 91177308-0d34-0410-b5e6-96231b3b80d8
MergeFunctions, cmpType: fixed variable names from XXTy1 and XXTy2 to XXTyL and XXTyR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203907 91177308-0d34-0410-b5e6-96231b3b80d8
AddressSanitizer instrumentation for MOV and MOVAPS.

This is an initial version of *Sanitizer instrumentation of assembly code.

Patch by Yuri Gorshenin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203908 91177308-0d34-0410-b5e6-96231b3b80d8
Generalise assembly tests to not rely on anonymous symbol names



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