platform/upstream/llvm.git
9 years ago[analyzer] Rename NewDeleteLeaks checker in the test script.
Anna Zaks [Fri, 31 Oct 2014 17:40:14 +0000 (17:40 +0000)]
[analyzer] Rename NewDeleteLeaks checker in the test script.

Fixup to r220289.

llvm-svn: 220976

9 years ago[asan] run-time part of the caller-callee coverage instrumentation
Kostya Serebryany [Fri, 31 Oct 2014 17:19:11 +0000 (17:19 +0000)]
[asan] run-time part of the caller-callee coverage instrumentation

llvm-svn: 220975

9 years agoFix the build
David Blaikie [Fri, 31 Oct 2014 17:18:09 +0000 (17:18 +0000)]
Fix the build

llvm-svn: 220974

9 years ago[asan] fix caller-calee instrumentation to emit new cache for every call site
Kostya Serebryany [Fri, 31 Oct 2014 17:11:27 +0000 (17:11 +0000)]
[asan] fix caller-calee instrumentation to emit new cache for every call site

llvm-svn: 220973

9 years agoFix ARM HVA classification of classes with non-virtual bases
Reid Kleckner [Fri, 31 Oct 2014 17:10:41 +0000 (17:10 +0000)]
Fix ARM HVA classification of classes with non-virtual bases

Reuse the PPC64 HVA detection algorithm for ARM and AArch64. This is a
nice code deduplication, since they are roughly identical. A few virtual
method extension points are needed to understand how big an HVA can be
and what element types it can have for a given architecture.

Also make the record expansion code work in the presence of non-virtual
bases.

Reviewed By: uweigand, asl

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

llvm-svn: 220972

9 years agoRemove the wrongly named and now empty Ocaml directory
Justin Bogner [Fri, 31 Oct 2014 17:10:02 +0000 (17:10 +0000)]
Remove the wrongly named and now empty Ocaml directory

llvm-svn: 220971

9 years agoFix unused-function warning differently from r220853
David Blaikie [Fri, 31 Oct 2014 17:08:11 +0000 (17:08 +0000)]
Fix unused-function warning differently from r220853

Rather than executing this code only needed for an assertion even in a
non-asserts build, just roll the function into the assert. The assertion
text literally describes the two cases so it doesn't seem like this
benefits much from having a separate function (& have to hassle about
ifndef NDEBUG it out, etc)

llvm-svn: 220970

9 years agoUpdate the non-pthreads fallback for RWMutex on Unix
David Blaikie [Fri, 31 Oct 2014 17:02:30 +0000 (17:02 +0000)]
Update the non-pthreads fallback for RWMutex on Unix

Tested this by #if 0'ing out the pthreads implementation, which
indicated that this fallback was not currently compiling successfully
and applying this patch resolves that.

Patch by Andy Chien.

llvm-svn: 220969

9 years agoUnify and update link-messages.ll and redefinition.ll. NFC.
Rafael Espindola [Fri, 31 Oct 2014 16:52:30 +0000 (16:52 +0000)]
Unify and update link-messages.ll and redefinition.ll. NFC.

llvm-svn: 220968

9 years agoCorrect assert text from r220923
David Blaikie [Fri, 31 Oct 2014 16:45:36 +0000 (16:45 +0000)]
Correct assert text from r220923

Noticed in post-commit review by Adrian Prantl.

llvm-svn: 220967

9 years ago[libclang] Disable spell-checking and warnings during code-completion since they...
Argyrios Kyrtzidis [Fri, 31 Oct 2014 16:44:32 +0000 (16:44 +0000)]
[libclang] Disable spell-checking and warnings during code-completion since they are not needed.

llvm-svn: 220966

9 years ago[Makefile] If ENABLE_CLANG_ARCMT=0 it seems we don't build libclang, so the unittests...
Argyrios Kyrtzidis [Fri, 31 Oct 2014 16:44:30 +0000 (16:44 +0000)]
[Makefile] If ENABLE_CLANG_ARCMT=0 it seems we don't build libclang, so the unittests for libclang should be disabled too.

This is a modified patch provided by Vassil Vassilev.

llvm-svn: 220965

9 years agoMark a few variables const. NFC.
Rafael Espindola [Fri, 31 Oct 2014 16:08:17 +0000 (16:08 +0000)]
Mark a few variables const. NFC.

llvm-svn: 220964

9 years agoFix some bugs from D5988
Justin Hibbits [Fri, 31 Oct 2014 15:57:52 +0000 (15:57 +0000)]
Fix some bugs from D5988

Summary:
Ed Maste found some problems with the commit in D5988.  Address most of these.
While here, also add floating point return handling.  This doesn't handle
128-bit long double yet.  Since I don't have any system that uses it, I don't
currently have plans to implement it.

Reviewers: emaste

Reviewed By: emaste

Subscribers: emaste, lldb-commits

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

llvm-svn: 220963

9 years ago[CMake] llvm/examples: Update libdeps for unoptimized builds.
NAKAMURA Takumi [Fri, 31 Oct 2014 15:27:16 +0000 (15:27 +0000)]
[CMake] llvm/examples: Update libdeps for unoptimized builds.

llvm-svn: 220962

9 years ago[AArch64] CondOpt pass is missing FCMP instructions when searching backward for
Chad Rosier [Fri, 31 Oct 2014 15:17:36 +0000 (15:17 +0000)]
[AArch64] CondOpt pass is missing FCMP instructions when searching backward for
a CMP which defines the flags used by B.CC.

http://reviews.llvm.org/D6047
Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>!

llvm-svn: 220961

9 years ago[SCEV] Improve Scalar Evolution's use of no {un,}signed wrap flags
Bradley Smith [Fri, 31 Oct 2014 11:40:32 +0000 (11:40 +0000)]
[SCEV] Improve Scalar Evolution's use of no {un,}signed wrap flags

In a case where we have a no {un,}signed wrap flag on the increment, if
RHS - Start is constant then we can avoid inserting a max operation bewteen
the two, since we can statically determine which is greater.

This allows us to unroll loops such as:

 void testcase3(int v) {
   for (int i=v; i<=v+1; ++i)
     f(i);
 }

llvm-svn: 220960

9 years ago[PowerPC] Load BlockAddress values from the TOC in 64-bit SVR4 code
Ulrich Weigand [Fri, 31 Oct 2014 10:33:14 +0000 (10:33 +0000)]
[PowerPC] Load BlockAddress values from the TOC in 64-bit SVR4 code

Since block address values can be larger than 2GB in 64-bit code, they
cannot be loaded simply using an @l / @ha pair, but instead must be
loaded from the TOC, just like GlobalAddress, ConstantPool, and
JumpTable values are.

The commit also fixes a bug in PPCLinuxAsmPrinter::doFinalization where
temporary labels could not be used as TOC values, since code would
attempt (and fail) to use GetOrCreateSymbol to create a symbol of the
same name as the temporary label.

llvm-svn: 220959

9 years ago[OCaml] Ensure consistent naming.
Peter Zotov [Fri, 31 Oct 2014 09:19:03 +0000 (09:19 +0000)]
[OCaml] Ensure consistent naming.

Specifically:
  * Directories match module names.
  * Test names match module names.
  * The language is called "OCaml", not "Ocaml".

llvm-svn: 220958

9 years ago[OCaml] Rework Llvm_executionengine using ctypes.
Peter Zotov [Fri, 31 Oct 2014 09:05:36 +0000 (09:05 +0000)]
[OCaml] Rework Llvm_executionengine using ctypes.

Since JIT->MCJIT migration, most of the ExecutionEngine interface
became deprecated and/or broken. This especially affected the OCaml
bindings, as runFunction is no longer available, and unlike in C,
it is not possible to coerce a pointer to a function and call it
in OCaml.

In practice, LLVM 3.5 shipped completely unusable
Llvm_executionengine.

The GenericValue interface and runFunction were essentially
a poor man's FFI. As such, this interface was removed and instead
a dependency on ctypes >=0.3 added, which handled platform-specific
aspects of accessing data and calling functions.

The new interface does not expose JIT (which is a shim around MCJIT),
as well as the interpreter (which can't handle a lot of valid IR).

Llvm_executionengine.add_global_mapping is currently unusable
due to PR20656.

llvm-svn: 220957

9 years agoRemove StorageClass typedefs from VarDecl and FunctionDecl since StorageClass is...
Craig Topper [Fri, 31 Oct 2014 06:57:13 +0000 (06:57 +0000)]
Remove StorageClass typedefs from VarDecl and FunctionDecl since StorageClass is in the clang namespace.

llvm-svn: 220956

9 years agoRemove CastKind typedef from CastExpr since CastKind is in the clang namespace.
Craig Topper [Fri, 31 Oct 2014 06:57:10 +0000 (06:57 +0000)]
Remove CastKind typedef from CastExpr since CastKind is in the clang namespace.

llvm-svn: 220955

9 years agoRemove a couple typedefs for things in the clang namespace with the same name. Remove...
Craig Topper [Fri, 31 Oct 2014 06:57:07 +0000 (06:57 +0000)]
Remove a couple typedefs for things in the clang namespace with the same name. Remove a typedef that matches an identical one in the clang namespace.

llvm-svn: 220954

9 years agoMove an input file to Inputs instead of using RUN: true.
Rafael Espindola [Fri, 31 Oct 2014 05:54:15 +0000 (05:54 +0000)]
Move an input file to Inputs instead of using RUN: true.

llvm-svn: 220953

9 years agoObject, COFF: Cleanup symbol type code, improve binutils compatibility
David Majnemer [Fri, 31 Oct 2014 05:07:00 +0000 (05:07 +0000)]
Object, COFF: Cleanup symbol type code, improve binutils compatibility

Do a better job classifying symbols.  This increases the consistency
between the COFF handling code and the ELF side of things.

llvm-svn: 220952

9 years agomerge tests for constant linking.
Rafael Espindola [Fri, 31 Oct 2014 05:04:16 +0000 (05:04 +0000)]
merge tests for constant linking.

llvm-svn: 220951

9 years agoMove definition closer to use. NFC.
Rafael Espindola [Fri, 31 Oct 2014 04:46:38 +0000 (04:46 +0000)]
Move definition closer to use. NFC.

llvm-svn: 220949

9 years agoUpdate default disassembly format string so we get
Jason Molenda [Fri, 31 Oct 2014 03:40:06 +0000 (03:40 +0000)]
Update default disassembly format string so we get
better output when we don't have any symbol name.
It looked like this:

0x1097fd029 <ud2
0x1097fd02b <addb   %al, (%rax)

now, like this:

0x10cdd3064: ud2
0x10cdd3066: addb   %al, (%rax)

<rdar://problem/18833391>

llvm-svn: 220948

9 years agoUpdate xcode project file to build new ppc files.
Jason Molenda [Fri, 31 Oct 2014 03:39:11 +0000 (03:39 +0000)]
Update xcode project file to build new ppc files.

llvm-svn: 220947

9 years ago[AArch64]Add 2 intrinsics vmov_n_p64/vmovq_n_p64, the alias for vdup_n_p64/vdup_n_p64.
Hao Liu [Fri, 31 Oct 2014 02:41:37 +0000 (02:41 +0000)]
[AArch64]Add 2 intrinsics vmov_n_p64/vmovq_n_p64, the alias for vdup_n_p64/vdup_n_p64.
As this change is too small, commit it directly.

llvm-svn: 220946

9 years agoPR20557: Fix the bug that bogus cpu parameter crashes llc on AArch64 backend.
Hao Liu [Fri, 31 Oct 2014 02:35:34 +0000 (02:35 +0000)]
PR20557: Fix the bug that bogus cpu parameter crashes llc on AArch64 backend.
Initial patch by Oleg Ranevskyy.

llvm-svn: 220945

9 years agoFirst cut of PowerPC(64) support in LLDB.
Justin Hibbits [Fri, 31 Oct 2014 02:34:28 +0000 (02:34 +0000)]
First cut of PowerPC(64) support in LLDB.

Summary:
This adds preliminary support for PowerPC/PowerPC64, for FreeBSD.  There are
some issues still:

 * Breakpoints don't work well on powerpc64.
 * Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host.
 * Backtraces don't work.  This is due to PowerPC ABI using a backchain pointer
   in memory, instead of a dedicated frame pointer register for the backchain.
 * Breakpoints on functions without debug info may not work correctly for 32-bit
   powerpc.

Reviewers: emaste, tfiala, jingham, clayborg

Reviewed By: clayborg

Subscribers: emaste, lldb-commits

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

llvm-svn: 220944

9 years ago[modules] When a .pcm file is explicitly built separately from the translation
Richard Smith [Fri, 31 Oct 2014 02:28:58 +0000 (02:28 +0000)]
[modules] When a .pcm file is explicitly built separately from the translation
unit, allow the -O settings of the two compilations to differ.

llvm-svn: 220943

9 years agoMake QualType::dump() produce a useful dump of the structure of the type,
Richard Smith [Fri, 31 Oct 2014 01:17:45 +0000 (01:17 +0000)]
Make QualType::dump() produce a useful dump of the structure of the type,
rather than simply pretty-printing it.

llvm-svn: 220942

9 years agoThreading.h: Give named parameters to llvm::call_once(flag,UserFn). [-Wdocumentation]
NAKAMURA Takumi [Fri, 31 Oct 2014 00:54:20 +0000 (00:54 +0000)]
Threading.h: Give named parameters to llvm::call_once(flag,UserFn). [-Wdocumentation]

llvm-svn: 220941

9 years agoASTDumper.cpp: Appease g++, for now.
NAKAMURA Takumi [Fri, 31 Oct 2014 00:30:37 +0000 (00:30 +0000)]
ASTDumper.cpp: Appease g++, for now.

llvm-svn: 220940

9 years agoRename 'DarwinStaticLib' to 'DarwinLibName'
Kuba Brecka [Fri, 31 Oct 2014 00:08:57 +0000 (00:08 +0000)]
Rename 'DarwinStaticLib' to 'DarwinLibName'

The former name doesn't make sense, we are using this parameter for both .a and .dylib libraries.

No functional change.

http://reviews.llvm.org/D6040

llvm-svn: 220939

9 years agoGet the correct process architecture in ProcessKDP::DidAttach().
Greg Clayton [Fri, 31 Oct 2014 00:06:52 +0000 (00:06 +0000)]
Get the correct process architecture in ProcessKDP::DidAttach().

<rdar://problem/18806212>

llvm-svn: 220938

9 years ago[SelectionDAG] When scalarizing trunc, don't assert for legal operands.
Ahmed Bougacha [Thu, 30 Oct 2014 23:46:50 +0000 (23:46 +0000)]
[SelectionDAG] When scalarizing trunc, don't assert for legal operands.

r212242 introduced a legalizer hook, originally to let AArch64 widen
v1i{32,16,8} rather than scalarize, because the legalizer expected, when
scalarizing the result of a conversion operation, to already have
scalarized the operands.  On AArch64, v1i64 is legal, so that commit
ensured operations such as v1i32 = trunc v1i64 wouldn't assert.

It did that by choosing to widen v1 types whenever possible.  However,
v1i1 types, for which there's no legal widened type, would still trigger
the assert.

This commit fixes that, by only scalarizing a trunc's result when the
operand has already been scalarized, and introducing an extract_elt
otherwise.
This is similar to r205625.

Fixes PR20777.

llvm-svn: 220937

9 years agoSpeculative fix for Windows build after r220932
Hans Wennborg [Thu, 30 Oct 2014 23:10:01 +0000 (23:10 +0000)]
Speculative fix for Windows build after r220932

llvm-svn: 220936

9 years agoEXPORTED_SYMBOL_FILE using mingw and cmake
Chris Bieneman [Thu, 30 Oct 2014 22:37:58 +0000 (22:37 +0000)]
EXPORTED_SYMBOL_FILE using mingw and cmake

Summary: This is a fix for the command line syntax error while building LTO when using MinGW.

Patch By: jsroemer

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, beanz, llvm-commits

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

llvm-svn: 220935

9 years agollvm/test/Transforms/SampleProfile/syntax.ll: Relax MISSING-FILE not to
NAKAMURA Takumi [Thu, 30 Oct 2014 22:28:46 +0000 (22:28 +0000)]
llvm/test/Transforms/SampleProfile/syntax.ll: Relax MISSING-FILE not to
check locale-aware message catalog.

llvm-svn: 220934

9 years agoFix incorrect invariant check in DAG Combine
Louis Gerbarg [Thu, 30 Oct 2014 22:21:03 +0000 (22:21 +0000)]
Fix incorrect invariant check in DAG Combine

Earlier this summer I fixed an issue where we were incorrectly combining
multiple loads that had different constraints such alignment, invariance,
temporality, etc. Apparently in one case I made copt paste error and swapped
alignment and invariance.

Tests included.

rdar://18816719

llvm-svn: 220933

9 years agoRemoving the static initializer in ManagedStatic.cpp by using llvm_call_once to initi...
Chris Bieneman [Thu, 30 Oct 2014 22:07:09 +0000 (22:07 +0000)]
Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex.

Summary:
This patch adds an llvm_call_once which is a wrapper around std::call_once on platforms where it is available and devoid of bugs. The patch also migrates the ManagedStatic mutex to be allocated using llvm_call_once.

These changes are philosophically equivalent to the changes added in r219638, which were reverted due to a hang on Win32 which was the result of a bug in the Windows implementation of std::call_once.

Reviewers: aaron.ballman, chapuni, chandlerc, rnk

Reviewed By: rnk

Subscribers: majnemer, llvm-commits

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

llvm-svn: 220932

9 years ago[Mips] Add ABI and ARCH flags to the object files.
Simon Atanasyan [Thu, 30 Oct 2014 21:20:27 +0000 (21:20 +0000)]
[Mips] Add ABI and ARCH flags to the object files.

No functional changes.

llvm-svn: 220931

9 years agoRefactor tree printing in AST dumping.
Richard Smith [Thu, 30 Oct 2014 21:02:37 +0000 (21:02 +0000)]
Refactor tree printing in AST dumping.

Instead of manually maintaining a flag indicating whether we're about to print
out the last child of the parent node (to determine whether we print "`" or
"|"), capture a callable to print that child and defer printing it until we
either see a next child or finish the parent.

No functionality change intended.

llvm-svn: 220930

9 years agollvm-cov: Follow LLVM naming conventions
Justin Bogner [Thu, 30 Oct 2014 20:57:49 +0000 (20:57 +0000)]
llvm-cov: Follow LLVM naming conventions

This renames a few things that are using an unusual naming convention.

llvm-svn: 220929

9 years agollvm-cov: Don't manually parse an option for no reason
Justin Bogner [Thu, 30 Oct 2014 20:51:24 +0000 (20:51 +0000)]
llvm-cov: Don't manually parse an option for no reason

We're using cl::opt here, but for some reason we're reading out one
particular option by hand instead. This makes -help and the like
behave rather poorly, so let's not do it this way.

llvm-svn: 220928

9 years agoFix the merging of the constantness of declarations.
Rafael Espindola [Thu, 30 Oct 2014 20:50:23 +0000 (20:50 +0000)]
Fix the merging of the constantness of declarations.

The langref says:

LLVM explicitly allows declarations of global variables to be marked
constant, even if the final definition of the global is not. This
capability can be used to enable slightly better optimization of the
program, but requires the language definition to guarantee that
optimizations based on the ‘constantness’ are valid for the
translation units that do not include the definition.

Given that definition, when merging two declarations, we have to drop
constantness if of of them is not marked contant, since the Module
without the constant marker might not have the necessary guarantees.

llvm-svn: 220927

9 years agollvm-cov: Very basic top level help
Justin Bogner [Thu, 30 Oct 2014 20:29:48 +0000 (20:29 +0000)]
llvm-cov: Very basic top level help

llvm-svn: 220926

9 years agoAdd handling for range metadata in ValueTracking isKnownNonZero
Philip Reames [Thu, 30 Oct 2014 20:25:19 +0000 (20:25 +0000)]
Add handling for range metadata in ValueTracking isKnownNonZero

If we load from a location with range metadata, we can use information about the ranges of the loaded value for optimization purposes.  This helps to remove redundant checks and canonicalize checks for other optimization passes.  This particular patch checks whether a value is known to be non-zero from the range metadata.

Currently, these tests are against InstCombine.  In theory, all of these should be InstSimplify since we're not inserting any new instructions.  Moving the code may follow in a separate change.

Reviewed by: Hal
Differential Revision: http://reviews.llvm.org/D5947

llvm-svn: 220925

9 years agoUpdate test to pass .ll to llvm-link and use Inputs.
Rafael Espindola [Thu, 30 Oct 2014 20:23:59 +0000 (20:23 +0000)]
Update test to pass .ll to llvm-link and use Inputs.

llvm-svn: 220924

9 years agoPR21408: Workaround the appearance of duplicate variables due to problems when inlini...
David Blaikie [Thu, 30 Oct 2014 20:20:11 +0000 (20:20 +0000)]
PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site.

llvm-svn: 220923

9 years agoFix comment spelling and tidy diagnostic call in profile reader.
Diego Novillo [Thu, 30 Oct 2014 20:19:19 +0000 (20:19 +0000)]
Fix comment spelling and tidy diagnostic call in profile reader.

No functional changes.

llvm-svn: 220922

9 years agoRemove #include <codecvt>. It isn't supported on all compilers.
Zachary Turner [Thu, 30 Oct 2014 19:42:08 +0000 (19:42 +0000)]
Remove #include <codecvt>.  It isn't supported on all compilers.

Also it wasn't being used anyway, so it appears to be a dead include.

llvm-svn: 220921

9 years agoGet rid of SanitizerOptions::Disabled global. NFC.
Alexey Samsonov [Thu, 30 Oct 2014 19:33:44 +0000 (19:33 +0000)]
Get rid of SanitizerOptions::Disabled global. NFC.

SanitizerOptions is not even a POD now, so having global variable of
this type, is not nice. Instead, provide a regular constructor and clear()
method, and let each CodeGenFunction has its own copy of SanitizerOptions
it uses.

llvm-svn: 220920

9 years agolit: PR21417: don't try to update OCAMLPATH if LibDir is empty.
Peter Zotov [Thu, 30 Oct 2014 19:26:42 +0000 (19:26 +0000)]
lit: PR21417: don't try to update OCAMLPATH if LibDir is empty.

llvm-svn: 220919

9 years agoFix Twine corruption problem with diagnostics.
Diego Novillo [Thu, 30 Oct 2014 18:48:41 +0000 (18:48 +0000)]
Fix Twine corruption problem with diagnostics.

This fixes the autobuilders I broke with a recent patch. Thanks echristo
and dblaikie for beating me with a clue stick.

llvm-svn: 220918

9 years agoAlso port the C string reading code in ValueObject over to using StringPrinter API
Enrico Granata [Thu, 30 Oct 2014 18:27:31 +0000 (18:27 +0000)]
Also port the C string reading code in ValueObject over to using StringPrinter API

llvm-svn: 220917

9 years ago[mach-o] use the addend in GOT-based relocations.
Tim Northover [Thu, 30 Oct 2014 18:01:07 +0000 (18:01 +0000)]
[mach-o] use the addend in GOT-based relocations.

These are used to reference typeinfo data in the exception table section, for
example.

llvm-svn: 220916

9 years agoAdd profile writing capabilities for sampling profiles.
Diego Novillo [Thu, 30 Oct 2014 18:00:06 +0000 (18:00 +0000)]
Add profile writing capabilities for sampling profiles.

Summary:
This patch finishes up support for handling sampling profiles in both
text and binary formats. The new binary format uses uleb128 encoding to
represent numeric values. This makes profiles files about 25% smaller.

The profile writer class can write profiles in the existing text and the
new binary format. In subsequent patches, I will add the capability to
read (and perhaps write) profiles in the gcov format used by GCC.

Additionally, I will be adding support in llvm-profdata to manipulate
sampling profiles.

There was a bit of refactoring needed to separate some code that was in
the reader files, but is actually common to both the reader and writer.

The new test checks that reading the same profile encoded as text or
raw, produces the same results.

Reviewers: bogner, dexonsmith

Subscribers: llvm-commits

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

llvm-svn: 220915

9 years agoRemove hex character number from wchar_t test
Ed Maste [Thu, 30 Oct 2014 17:41:11 +0000 (17:41 +0000)]
Remove hex character number from wchar_t test

After r220894 (StringPrinter change) it is no longer emitted. Update the
test rather than considering it a bug as the new format is preferred.

llvm-svn: 220914

9 years agoARM: test default values for TAG_CPU_unaligned_access attribute.
Tim Northover [Thu, 30 Oct 2014 17:05:44 +0000 (17:05 +0000)]
ARM: test default values for TAG_CPU_unaligned_access attribute.

It should be on for every target that supports unaligned accesses (e.g. not
v6m).

Patch by Charlie Turner.

llvm-svn: 220912

9 years ago[analyzer] Updated tests for ZeroAllocDereference checker.
Anton Yartsev [Thu, 30 Oct 2014 15:16:26 +0000 (15:16 +0000)]
[analyzer] Updated tests for ZeroAllocDereference checker.

llvm-svn: 220911

9 years ago[Mips] Add new Mips specific e_flags.
Simon Atanasyan [Thu, 30 Oct 2014 14:56:02 +0000 (14:56 +0000)]
[Mips] Add new Mips specific e_flags.

No functional changes.

llvm-svn: 220910

9 years agoFix CMake build, adding StringPrinter.cpp from r220894
Ed Maste [Thu, 30 Oct 2014 14:50:42 +0000 (14:50 +0000)]
Fix CMake build, adding StringPrinter.cpp from r220894

llvm-svn: 220909

9 years ago[AVX512] Added VBROADCAST{SS/SD} encoding for VL subset.
Robert Khasanov [Thu, 30 Oct 2014 14:21:47 +0000 (14:21 +0000)]
[AVX512] Added VBROADCAST{SS/SD} encoding for VL subset.
Refactored through AVX512_maskable

llvm-svn: 220908

9 years agoUpdate __dfsw_s{,n}printf custom functions for new calling convention.
Peter Collingbourne [Thu, 30 Oct 2014 13:23:01 +0000 (13:23 +0000)]
Update __dfsw_s{,n}printf custom functions for new calling convention.

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

llvm-svn: 220907

9 years ago[dfsan] New calling convention for custom functions with variadic arguments.
Peter Collingbourne [Thu, 30 Oct 2014 13:22:57 +0000 (13:22 +0000)]
[dfsan] New calling convention for custom functions with variadic arguments.

Summary:
The previous calling convention prevented custom functions from being able
to access argument labels unless it knew how many variadic arguments there
were, and of which type. This restriction made it impossible to correctly
model functions in the printf family, as it is legal to pass more arguments
than required to those functions. We now pass arguments in the following order:

non-vararg arguments
labels for non-vararg arguments
[if vararg function, pointer to array of labels for vararg arguments]
[if non-void function, pointer to label for return value]
vararg arguments

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

llvm-svn: 220906

9 years agoUpdate contact person in Open Projects webpage for copy-paste detection. From Per...
Daniel Marjamaki [Thu, 30 Oct 2014 12:44:33 +0000 (12:44 +0000)]
Update contact person in Open Projects webpage for copy-paste detection. From Per Viberg to Daniel Marjamäki.

llvm-svn: 220905

9 years ago[autoconf] Add clangToolingCore.a to Makefile(s) for static build w/o libclang.dll.
NAKAMURA Takumi [Thu, 30 Oct 2014 10:31:29 +0000 (10:31 +0000)]
[autoconf] Add clangToolingCore.a to Makefile(s) for static build w/o libclang.dll.

llvm-svn: 220904

9 years ago[OCaml] Expose LLVMCloneModule.
Peter Zotov [Thu, 30 Oct 2014 08:30:12 +0000 (08:30 +0000)]
[OCaml] Expose LLVMCloneModule.

llvm-svn: 220903

9 years ago[OCaml] Expose LLVM{Get,Set}DLLStorageClass.
Peter Zotov [Thu, 30 Oct 2014 08:30:08 +0000 (08:30 +0000)]
[OCaml] Expose LLVM{Get,Set}DLLStorageClass.

llvm-svn: 220902

9 years ago[OCaml] Test code emission in Llvm_target.
Peter Zotov [Thu, 30 Oct 2014 08:30:01 +0000 (08:30 +0000)]
[OCaml] Test code emission in Llvm_target.

Prior to this commit, the Llvm_target tests (ab)used
the Llvm_executionengine as a mechanism to initialize at least some
target. This needlessly restricted tests to builds which can emit
code for their host architecture.

llvm-svn: 220901

9 years ago[OCaml] Enable backtraces in tests.
Peter Zotov [Thu, 30 Oct 2014 08:29:57 +0000 (08:29 +0000)]
[OCaml] Enable backtraces in tests.

llvm-svn: 220900

9 years ago[OCaml] [autoconf] Migrate to ocamlfind.
Peter Zotov [Thu, 30 Oct 2014 08:29:45 +0000 (08:29 +0000)]
[OCaml] [autoconf] Migrate to ocamlfind.

This commit updates the OCaml bindings and tests to use ocamlfind.
The bindings are migrated in order to use ctypes, which are now
required for MCJIT-backed Llvm_executionengine.
The tests are migrated in order to use OUnit and to verify that
the distributed META.llvm allows to build working executables.

Every OCaml toolchain invocation is now chained through ocamlfind,
which (in theory) allows to cross-compile the OCaml bindings.

The configure script now checks for ctypes (>= 0.2.3) and
OUnit (>= 2). The code depending on these libraries will be added
later. The configure script does not check the package versions
in order to keep changes less invasive.

Additionally, OCaml bindings will now be automatically enabled
if ocamlfind is detected on the system, rather than ocamlc, as it
was before.

llvm-svn: 220899

9 years ago[OCaml] De-duplicate llvm_raise and llvm_string_of_message.
Peter Zotov [Thu, 30 Oct 2014 08:29:29 +0000 (08:29 +0000)]
[OCaml] De-duplicate llvm_raise and llvm_string_of_message.

llvm-svn: 220898

9 years agoRemove the last couple uses of the ExprArg(just Expr*) typedef in Parser.
Craig Topper [Thu, 30 Oct 2014 05:30:05 +0000 (05:30 +0000)]
Remove the last couple uses of the ExprArg(just Expr*) typedef in Parser.

llvm-svn: 220897

9 years agoRemove some duplicate functions from the Parser class. Identical functions already...
Craig Topper [Thu, 30 Oct 2014 05:17:10 +0000 (05:17 +0000)]
Remove some duplicate functions from the Parser class. Identical functions already exist in the clang namespace from Sema/Ownership.h.

llvm-svn: 220896

9 years ago[CMake] clangApplyReplacement: Add clangAST in libdeps to appease msc builder.
NAKAMURA Takumi [Thu, 30 Oct 2014 03:22:32 +0000 (03:22 +0000)]
[CMake] clangApplyReplacement: Add clangAST in libdeps to appease msc builder.

  clangApplyReplacements.lib(ApplyReplacements.cpp.obj) : error LNK2001: unresolved external symbol "private: void __thiscall clang::APValue::DestroyDataAndMakeUninit(void)" (?DestroyDataAndMakeUninit@APValue@clang@@AAEXXZ)

They are not seen in mingw dll build. Investigating.

llvm-svn: 220895

9 years agoStart adopting the StringPrinter API. The StringPrinter API is the new blessed way...
Enrico Granata [Thu, 30 Oct 2014 01:45:39 +0000 (01:45 +0000)]
Start adopting the StringPrinter API. The StringPrinter API is the new blessed way of printing strings that supports escaping non-printables, and has better handling of different UTF encodings

llvm-svn: 220894

9 years ago[CMake] Prune redundant libdeps.
NAKAMURA Takumi [Thu, 30 Oct 2014 01:37:44 +0000 (01:37 +0000)]
[CMake] Prune redundant libdeps.

llvm-svn: 220893

9 years agoRemove unused service plist.
Jason Molenda [Thu, 30 Oct 2014 01:04:59 +0000 (01:04 +0000)]
Remove unused service plist.

llvm-svn: 220892

9 years agoAdd the ability for a ClangASTType to be marked as 'packed' when constructed
Enrico Granata [Thu, 30 Oct 2014 00:53:28 +0000 (00:53 +0000)]
Add the ability for a ClangASTType to be marked as 'packed' when constructed

llvm-svn: 220891

9 years ago[CMake] Add dependencies on clangToolingCore.
NAKAMURA Takumi [Thu, 30 Oct 2014 00:44:01 +0000 (00:44 +0000)]
[CMake] Add dependencies on clangToolingCore.

llvm-svn: 220890

9 years ago[CMake] clangToolingCore requires clangLex.
NAKAMURA Takumi [Thu, 30 Oct 2014 00:43:44 +0000 (00:43 +0000)]
[CMake] clangToolingCore requires clangLex.

llvm-svn: 220889

9 years ago[CMake] Reformat.
NAKAMURA Takumi [Thu, 30 Oct 2014 00:43:33 +0000 (00:43 +0000)]
[CMake] Reformat.

llvm-svn: 220888

9 years agoEnable the slp vectorizer in the gold plugin.
Rafael Espindola [Thu, 30 Oct 2014 00:38:54 +0000 (00:38 +0000)]
Enable the slp vectorizer in the gold plugin.

llvm-svn: 220887

9 years agoEnable the loop vectorizer in the gold plugin.
Rafael Espindola [Thu, 30 Oct 2014 00:11:24 +0000 (00:11 +0000)]
Enable the loop vectorizer in the gold plugin.

llvm-svn: 220886

9 years agoReplace also-emit-llvm with save-temps.
Rafael Espindola [Wed, 29 Oct 2014 23:54:45 +0000 (23:54 +0000)]
Replace also-emit-llvm with save-temps.

The also-emit-llvm option only supported getting the IR before optimizations.
This patch replaces it with a more generic save-temps option that saves the IR
both before and after optimizations.

llvm-svn: 220885

9 years agoUntabify.
NAKAMURA Takumi [Wed, 29 Oct 2014 23:44:35 +0000 (23:44 +0000)]
Untabify.

llvm-svn: 220884

9 years agoclang-format: Format line if invoked on the trailing newline.
Daniel Jasper [Wed, 29 Oct 2014 23:40:50 +0000 (23:40 +0000)]
clang-format: Format line if invoked on the trailing newline.

llvm-svn: 220883

9 years agolibcxxrt now implements bad_array_new_length and need to gaurd against multiple defin...
Eric Fiselier [Wed, 29 Oct 2014 23:14:53 +0000 (23:14 +0000)]
libcxxrt now implements bad_array_new_length and need to gaurd against multiple defines. Patch from Baptiste Daroussin.

llvm-svn: 220882

9 years agoFix the NSPathStore2 data formatter to actually handle the explicit length stored...
Enrico Granata [Wed, 29 Oct 2014 23:08:02 +0000 (23:08 +0000)]
Fix the NSPathStore2 data formatter to actually handle the explicit length stored inside the object. The meat of this commit, however, is a nice little API for easily adding new __lldb_autogen_ helper types to an AST context

llvm-svn: 220881

9 years agollvm/test/Transforms/LoopRotate/nosimplifylatch.ll: Fix possibly mis-repeatedly-paste...
NAKAMURA Takumi [Wed, 29 Oct 2014 23:05:12 +0000 (23:05 +0000)]
llvm/test/Transforms/LoopRotate/nosimplifylatch.ll: Fix possibly mis-repeatedly-pasted test.

llvm-svn: 220880

9 years agoSink a #include while we're here. NFC.
Hans Wennborg [Wed, 29 Oct 2014 22:49:58 +0000 (22:49 +0000)]
Sink a #include while we're here. NFC.

Format.h doesn't use stack.

llvm-svn: 220879

9 years agoclang-format: Cut more clangAST dependencies.
Daniel Jasper [Wed, 29 Oct 2014 22:42:53 +0000 (22:42 +0000)]
clang-format: Cut more clangAST dependencies.

Hopefully fixing windows builds.

llvm-svn: 220878

9 years agoTrim some includes. NFC.
Hans Wennborg [Wed, 29 Oct 2014 22:13:46 +0000 (22:13 +0000)]
Trim some includes. NFC.

llvm-svn: 220877

9 years agoDelete some unnecessary code
Tobias Grosser [Wed, 29 Oct 2014 22:09:54 +0000 (22:09 +0000)]
Delete some unnecessary code

Originally we have needed this code to map the isl_id of an array to its base
pointer. However, as now the isl_id contains a reference to the array itself we
obtain the base pointer from this isl_id and we do not need to add this
information to the IDToValue map.

llvm-svn: 220876

9 years agoRun clang-format on tools/llvm-objdump/MachODump.cpp . No functional change.
Kevin Enderby [Wed, 29 Oct 2014 21:28:24 +0000 (21:28 +0000)]
Run clang-format on tools/llvm-objdump/MachODump.cpp . No functional change.

llvm-svn: 220875