[CMake] Put -Werror to CMAKE_CXX_FLAGS instead of using add_llvm_definitions()

add_definitions shouldn't really be used for compiler flags, and the variable
LLVM_DEFINITIONS is not appropriately used at the moment, e.g. it's not exported
to LLVMConfig.cmake


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203792 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix handling of byval arguments in VarArg calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203794 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGenPrep: sink extends of illegal types into use block.

Summary:
This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

This is an update of D2973 which was reverted because of a bug reported
as PR19084.

Reviewers: t.p.northover, chapuni

Reviewed By: t.p.northover

CC: llvm-commits, alex, chapuni

Differential Revision: http://llvm-reviews.chandlerc.com/D3021

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203797 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Introduce ObjectFile::sections().

Summary:
This adds ObjectFile::section_iterator_range, that allows to write
range-based for-loops running over all sections of a given file.
Several files from lib/ are converted to the new interface. Similar fixes
should be applied to a variety of llvm-* tools.

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3069

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203799 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Use ObjectFile::sections() in commandline llvm tools

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203802 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM] Use symbolic register names in .cfi directives only with IAS (PR19110)

This is a follow-up to r203635. Saleem pointed out that since symbolic register
names are much easier to read, it would be good if we could turn them off only
when we really need to because we're using an external assembler.

Differential Revision: http://llvm-reviews.chandlerc.com/D3056

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203806 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup: Remove use of old "-enable-correct-eh-support" option from a test

This option enables LowerInvoke's obsolete SJLJ EH support, but the
target used in this test (ARM Darwin) no longer uses the LowerInvoke
pass, so the option has no effect here.  This target currently uses
the newer SjLjEHPrepare pass instead.

This cleanup will help with removing "-enable-correct-eh-support".

Differential Revision: http://llvm-reviews.chandlerc.com/D3064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203810 91177308-0d34-0410-b5e6-96231b3b80d8
R600: LDS instructions shouldn't implicitly define OQAP

LDS instructions are pseudo instructions which model
the OQAP defs and uses within a single instruction.

This fixes a hang in the opencv MedianFilter tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203818 91177308-0d34-0410-b5e6-96231b3b80d8
MCDwarf: Refactor line table handling into a single data structure

This replaces several "compile unit ID -> thing" mappings in favor of
one mapping from CUID to the whole line table structure (files,
directories, and lines).

This is another step along the way to refactoring out reusable
components of line table handling for use when generating debug_line.dwo
for fission type units.

Also, might be a good basis to fold some of this handling down into
MCStreamers to avoid the special case of "One line table when doing asm
printing, line table per CU otherwise" by building it into the different
MCStreamer implementations.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203823 91177308-0d34-0410-b5e6-96231b3b80d8
Update my e-mail address in CODE_OWNERS.TXT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203824 91177308-0d34-0410-b5e6-96231b3b80d8
Use printable names to implement directional labels.

This changes the implementation of local directional labels to use a dedicated
map. With that it can then just use CreateTempSymbol, which is what the rest
of MC uses.

CreateTempSymbol doesn't do a great job at making sure the names are unique
(or being efficient when the names are not needed), but that should probably
be fixed in a followup patch.

This fixes pr18928.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203826 91177308-0d34-0410-b5e6-96231b3b80d8
MCDwarf: Simply MCDwarfFile since it really is just a StringRef and unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203827 91177308-0d34-0410-b5e6-96231b3b80d8
Fix for http://llvm.org/bugs/show_bug.cgi?id=18590

This patch fixes the bug in peephole optimization that folds a load which defines one vreg into the one and only use of that vreg. With debug info, a DBG_VALUE that referenced the vreg considered to be a use, preventing the optimization. The fix is to ignore DBG_VALUE's during the optimization, and undef a DBG_VALUE that references a vreg that gets removed.
Patch by Trevor Smigiel!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203829 91177308-0d34-0410-b5e6-96231b3b80d8
MCDwarf: Simplify MCDwarfFile to just use std::string instead of cunning use of MCContext's allocator.

There aren't /that/ many files, and we are already using various maps
and other standard containers that don't use MCContext's allocator to
store these values, so this doesn't seem to be critical and simplifies
the design (I'll be moving construction out of MCContext shortly so it'd
be annoying to have to pass the allocator around to allocate these
things... and we'll have non-MCContext users (debug_line.dwo) shortly)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203831 91177308-0d34-0410-b5e6-96231b3b80d8
MCDwarf: Oh, and move the directory string over to std::string as well

(see r203831 for similar stuff)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203833 91177308-0d34-0410-b5e6-96231b3b80d8
Test commit - remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203834 91177308-0d34-0410-b5e6-96231b3b80d8
MCDwarf: Sink file/directory creation down into MCDwarfFileTable form MCContext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203836 91177308-0d34-0410-b5e6-96231b3b80d8
Add -mtriple=x86_64-linux to this test case to fix the build bots.5

The original commit was r203829.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203844 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a subtle issue introduced my my recent changes to MachineRegisterInfo iterators.
When initializing an iterator, we may have to step forward to find the first
operand that passes the current filter set.  When doing that stepping, we should
always step one operand at a time, even if this is by-instr or by-bundle iterator,
as we're stepping between invalid values, so the stride doesn't make sense there.

Fixes a miscompilation of YASM on Win32 reported by Hans Wennborg.  I have not
yet figured out how to reduce it to something testcase-able, because it's sensitive
to the details of how the registers get spilled.


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