AArch64: __va_list.__stack must be 8-byte aligned

The va_start macro for AArch64 must set va_list.__stack to the address
following the last named argument on the stack, rounded up to an alignment
of 8 bytes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201797 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unnecessary copy of array_lengthof.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201798 91177308-0d34-0410-b5e6-96231b3b80d8
Object/COFF: Fix possible truncation bug.

VA can be 64 bit, as the image base can be larger than 4GB, so we need to
handle 64 bit VAs properly.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201805 91177308-0d34-0410-b5e6-96231b3b80d8
test_debuginfo.pl: Make failures easier to debug by printing the debugger
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201809 91177308-0d34-0410-b5e6-96231b3b80d8
[Support] Correctly handle zero length inputs to UTF conversion functions on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201811 91177308-0d34-0410-b5e6-96231b3b80d8
cstdint is a C++11 header, LLVM provides its own version of it.

Some versions of libstdc++ forbid using cstdint in C++98 mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201812 91177308-0d34-0410-b5e6-96231b3b80d8
Set the SuppressWarnings option on tool level and propagate to the library.

The SuppressWarnings flag, unfortunately, isn't very useful for custom tools
that want to use the LLVM module linker. So I'm changing it to a parameter of
the Linker, and the flag itself moves to the llvm-link tool.

For the time being as SuppressWarnings is pretty much the only "option" it
seems reasonable to propagate it to Linker objects. If we end up with more
options in the future, some sort of "struct collecting options" may be a
better idea.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201819 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure that value handle users see the transformation of an indirect call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201822 91177308-0d34-0410-b5e6-96231b3b80d8
Stackmaps are used for OSR exits, which is a custom kind of unwinding. Hence, they 
should not be marked nounwind.

Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable 
sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind 
data for that matter), making deoptimization via stackmaps impossible.

This changes the stackmap intrinsic to be may-throw, adds a test for exactly the 
sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics.

Thanks to atrick and philipreames for reviewing this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201826 91177308-0d34-0410-b5e6-96231b3b80d8
Rename many DataLayout variables from TD to DL.

I am really sorry for the noise, but the current state where some parts of the
code use TD (from the old name: TargetData) and other parts use DL makes it
hard to write a patch that changes where those variables come from and how
they are passed along.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201827 91177308-0d34-0410-b5e6-96231b3b80d8
Rename a few more DataLayout variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201833 91177308-0d34-0410-b5e6-96231b3b80d8
One last pass of DataLayout variable renaming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201834 91177308-0d34-0410-b5e6-96231b3b80d8
Make DisableIntegratedAS a TargetOption.

This replaces the old NoIntegratedAssembler with at TargetOption. This is
more flexible and will be used to forward clang's -no-integrated-as option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201836 91177308-0d34-0410-b5e6-96231b3b80d8
This test was failing on non-X86-64 platforms because stackmaps only work on X86-64.

Disable it on non-X86-64 platforms and add a comment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201838 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Add register constraints to avoid generating STLXR and STXR with unpredictable behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201841 91177308-0d34-0410-b5e6-96231b3b80d8
Teach LLVM-Config to use logical target names (1/2)

LLVM library names are now available as logical CMake targets both
to our own build and to application CMake code.  Replace use of
'list(FIND)' with a simple 'if(TARGET)' to determine whether a
library is available.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201852 91177308-0d34-0410-b5e6-96231b3b80d8
Teach LLVM-Config to use logical target names (2/2)

The module still needs to collect the list of all available libraries
in order to satisfy the 'all' component.  Provide this in the package
configuration file, 'LLVMConfig.cmake', as a LLVM_AVAILABLE_LIBS
variable.  (A variable is scoped better than a global property.)
Since this won't be set for our own build, fall back to looking up the
LLVM_LIBS property to get the value when it is not set.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201853 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Introduce "llvm_add_library(SHARED STATIC)" to build both shared lib and static lib simulataneously.

  llvm_add_library(foo SHARED STATIC
    DEPENDS <dependent targets...>
    LINK_LIBS <required libraries...>
    )

It generates both foo (foo.so) and foo_static(foo.a) and both of them depend on DEPENDS and LINK_LIBS.
Then, also obj.foo is generated. obj.foo depends on DEPENDS, but doesn't depend on LINK_LIBS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201854 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] llvm_add_library: Add dependencies also to objlibs as workaround of CMake issue 14747.

http://www.cmake.org/Bug/view.php?id=14747

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