simplifycfg: Fix integer overflow converting switch into icmp.

If a switch instruction has a case for every possible value of its type,
with the same successor, SimplifyCFG would replace it with an icmp ult,
but the computation of the bound overflows in that case, which inverts
the test.

Patch by Jed Davis!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179587 91177308-0d34-0410-b5e6-96231b3b80d8
Add four new functions and one new enum to the C API:

LLVMGetThreadLocalMode - exposes GlobalVariable::getThreadLocalMode
LLVMSetThreadLocalMode - exposes GlobalVariable::setThreadLocalMode
LLVMIsExternallyInitialized - exposes GlobalVariable::isExternallyInitialized
LLVMSetExternallyInitialized - exposes GlobalVariable::setExternallyInitialized
LLVMThreadLocalMode - maps to GlobalVariable::ThreadLocalMode

Patch by Moritz Maxeiner!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179588 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-objdump: Don't print contents of BSS sections: it makes no sense and crashes llvm-objdump on relocated objects with large bss

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179589 91177308-0d34-0410-b5e6-96231b3b80d8
Implement ARM unwind opcode assembler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179591 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build failure introduced in 179591 when assertions are disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179593 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup naming: DataLayout s/TD/DL/



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179601 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179607 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Refactor. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179610 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused variable from previous refactor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179611 91177308-0d34-0410-b5e6-96231b3b80d8
[XCore] Convert a couple of tests to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179619 91177308-0d34-0410-b5e6-96231b3b80d8
[XCore] Give test more generic name.
    
I intend to extend the test with more offset folding checks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179620 91177308-0d34-0410-b5e6-96231b3b80d8
[XCore] Extend test to check positve offsets are folded into addresses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179621 91177308-0d34-0410-b5e6-96231b3b80d8
Print out the target-independent attributes in a comment before the function definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179622 91177308-0d34-0410-b5e6-96231b3b80d8
C API: Add LLVMAddTargetDependentFunctionAttr()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179645 91177308-0d34-0410-b5e6-96231b3b80d8
C API: Add LLVMGetBufferStart()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179646 91177308-0d34-0410-b5e6-96231b3b80d8
C API: Add LLVMGetBufferSize()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179647 91177308-0d34-0410-b5e6-96231b3b80d8
C API: Add LLVMTargetMachineEmitToMemoryBuffer()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179648 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Add support for parsing complex immediate expressions.  Test
cases to be submitted on clang side shortly.
rdar://13663768 and PR15760

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179655 91177308-0d34-0410-b5e6-96231b3b80d8
Mips assembler: Enable handling of nested expressions

This patch allows the Mips assembler to parse and emit nested 
expressions as instruction operands. It also extends the 
expansion of memory instructions when an offset is given as 
an expression. 

Contributer: Vladimir Medic



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179657 91177308-0d34-0410-b5e6-96231b3b80d8
Do not optimise fprintf() calls if its return value is used.

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

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