platform/upstream/llvm.git
10 years agoUpdate the developer policy to more clearly spell out the steps for
Chandler Carruth [Fri, 10 Jan 2014 00:08:34 +0000 (00:08 +0000)]
Update the developer policy to more clearly spell out the steps for
contributors to submit patches to the LLVM project. Thanks to Danny,
Chris, Alp, and others for reviewing.

llvm-svn: 198901

10 years ago[ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase Layout
Warren Hunt [Thu, 9 Jan 2014 23:51:31 +0000 (23:51 +0000)]
[ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase Layout

The MS abi lays out *all* non-virtual bases with leading vfptrs before
laying out non-virutal bases without vfptrs.  This guarantees that the
primary base is laid out first.  r198818 fixed RecordLayoutBuilder to
produce compatiable layouts.  This patch fixes CGRecordLayoutBuilder to
be able to consume those layouts and produce meaningful output without
tripping any asserts about assumed incoming layout.

A test case is included that shows CGRecordLayoutBuilder in fact
produces output in the compatiable order.

llvm-svn: 198900

10 years agoUpdating documentation for the __has_attribute changes landed in r198897.
Aaron Ballman [Thu, 9 Jan 2014 23:11:13 +0000 (23:11 +0000)]
Updating documentation for the __has_attribute changes landed in r198897.

llvm-svn: 198899

10 years ago__has_attribute now understands target-specific attributes. So when you ask whether...
Aaron Ballman [Thu, 9 Jan 2014 22:57:44 +0000 (22:57 +0000)]
__has_attribute now understands target-specific attributes. So when you ask whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others.

llvm-svn: 198897

10 years agoRemoving the notion of TargetAttributesSema and replacing it with one where the parse...
Aaron Ballman [Thu, 9 Jan 2014 22:48:32 +0000 (22:48 +0000)]
Removing the notion of TargetAttributesSema and replacing it with one where the parsed attributes are responsible for knowing their target-specific nature, instead of letting Sema figure it out. This is necessary so that __has_attribute can eventually determine whether a parsed attribute applies to the given target or not.

llvm-svn: 198896

10 years agoBitcode: Fix a typo in an assert
Justin Bogner [Thu, 9 Jan 2014 22:02:05 +0000 (22:02 +0000)]
Bitcode: Fix a typo in an assert

llvm-svn: 198894

10 years ago[Sparc] Multiclass for loads/stores. No functionality change intended.
Venkatraman Govindaraju [Thu, 9 Jan 2014 21:49:18 +0000 (21:49 +0000)]
[Sparc] Multiclass for loads/stores. No functionality change intended.

llvm-svn: 198893

10 years agoFix ast-dump-color.cpp test following r198883
Alp Toker [Thu, 9 Jan 2014 21:43:39 +0000 (21:43 +0000)]
Fix ast-dump-color.cpp test following r198883

The commit added a source location that used to be missing from the AST.

llvm-svn: 198892

10 years agoUse getPointerSizeInBits.
Rafael Espindola [Thu, 9 Jan 2014 21:32:51 +0000 (21:32 +0000)]
Use getPointerSizeInBits.

I introduced this bug in 198815. Thanks for Mark Lacey for noticing.
Unfortunately, I have no idea how to test this code.

llvm-svn: 198891

10 years agoPreserve -fretain-comments-from-system-headers in modules
Ben Langmuir [Thu, 9 Jan 2014 20:53:49 +0000 (20:53 +0000)]
Preserve -fretain-comments-from-system-headers in modules

Preserves the setting of -fretain-comments-from-system-headers when
building/saving/loading module files. This allows code completion to pick up
documentation comments from system modules.

llvm-svn: 198890

10 years agoClean up an inconsistency in v7s feature default.
Evan Cheng [Thu, 9 Jan 2014 20:24:00 +0000 (20:24 +0000)]
Clean up an inconsistency in v7s feature default.

llvm-svn: 198889

10 years agoHave attribute 'objc_precise_lifetime' suppress -Wunused.
Ted Kremenek [Thu, 9 Jan 2014 20:19:45 +0000 (20:19 +0000)]
Have attribute 'objc_precise_lifetime' suppress -Wunused.

Fixes <rdar://problem/15596883>

In ARC, __attribute__((objc_precise_lifetime)) guarantees that the
object stored in it will survive to the end of the variable's formal
lifetime.  It is therefore useful even if it completely unused.

llvm-svn: 198888

10 years agoAttempting to appease the build bots on systems with ansi escape sequences.
Aaron Ballman [Thu, 9 Jan 2014 20:12:12 +0000 (20:12 +0000)]
Attempting to appease the build bots on systems with ansi escape sequences.

llvm-svn: 198887

10 years agoAdd a unit test for the copy constructor.
Rafael Espindola [Thu, 9 Jan 2014 19:47:39 +0000 (19:47 +0000)]
Add a unit test for the copy constructor.

I would not normally add tests like these, but the copy constructor is not
used at all in our codebase with c++11, so having this tests might prevent
breaking the c++03 build again.

llvm-svn: 198886

10 years agoRevert "Disable LeakSanitizer in TableGen binaries, see PR18325"
Alp Toker [Thu, 9 Jan 2014 19:43:17 +0000 (19:43 +0000)]
Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"

To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.

See the list discussion for details.

This reverts commit r198858.

llvm-svn: 198885

10 years agoRevert "Disable LeakSanitizer in TableGen binaries, see PR18325"
Alp Toker [Thu, 9 Jan 2014 19:40:55 +0000 (19:40 +0000)]
Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"

To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.

See the list discussion for details.

This reverts commit r198858.

llvm-svn: 198884

10 years agoRemoving a bit of custom parsing functionality used by the thread safety analysis...
Aaron Ballman [Thu, 9 Jan 2014 19:39:35 +0000 (19:39 +0000)]
Removing a bit of custom parsing functionality used by the thread safety analysis APIs. Now using tablegen to determine whether an attribute's arguments should be parsed in an unevaluated context instead of relying on a separate, hard-coded list of attributes.

llvm-svn: 198883

10 years agoDocument unsetting environment variables in the lldb/gdb cheat sheet.
Jim Ingham [Thu, 9 Jan 2014 19:30:11 +0000 (19:30 +0000)]
Document unsetting environment variables in the lldb/gdb cheat sheet.

llvm-svn: 198881

10 years agoRe-remove dead code.
Nadav Rotem [Thu, 9 Jan 2014 19:22:07 +0000 (19:22 +0000)]
Re-remove dead code.
This reverts r198854.

llvm-svn: 198879

10 years agoFix PR18404 - 'Bug in regex_token_iterator::operator++(int) implementation'. Enhance...
Marshall Clow [Thu, 9 Jan 2014 18:25:57 +0000 (18:25 +0000)]
Fix PR18404 - 'Bug in regex_token_iterator::operator++(int) implementation'. Enhance the tests for regex_token_iterator and regex_iterator.

llvm-svn: 198878

10 years agoRe-applied r198807, r198808 with an additional change to fix linking in configure...
Alexander Kornienko [Thu, 9 Jan 2014 16:31:25 +0000 (16:31 +0000)]
Re-applied r198807, r198808 with an additional change to fix linking in configure Release+Asserts build.

llvm-svn: 198875

10 years ago[asan] Implement max_redzone runtime flag.
Evgeniy Stepanov [Thu, 9 Jan 2014 14:41:03 +0000 (14:41 +0000)]
[asan] Implement max_redzone runtime flag.

llvm-svn: 198873

10 years agoUpdate example to be more idiomatic.
Rafael Espindola [Thu, 9 Jan 2014 14:40:43 +0000 (14:40 +0000)]
Update example to be more idiomatic.

llvm-svn: 198872

10 years agoclang-format: Add @s when breaking NSString literals.
Daniel Jasper [Thu, 9 Jan 2014 14:18:12 +0000 (14:18 +0000)]
clang-format: Add @s when breaking NSString literals.

While it is allowed to not have an @ on subsequent lines, it seems
general practice to add them. If undesired, the code author can easily
remove them again and clang-format won't re-add them.

llvm-svn: 198871

10 years agoclang-format: Understand #pragma mark
Daniel Jasper [Thu, 9 Jan 2014 13:56:49 +0000 (13:56 +0000)]
clang-format: Understand #pragma mark

Before:
  #pragma mark Any non - hyphenated or hyphenated string(including parentheses).
After:
  #pragma mark Any non-hyphenated or hyphenated string (including parentheses).

llvm-svn: 198870

10 years agoclang-format: Some tweaks to braces list formatting:
Daniel Jasper [Thu, 9 Jan 2014 13:42:56 +0000 (13:42 +0000)]
clang-format: Some tweaks to braces list formatting:

- Format a braced list with one element per line if it has nested
  braced lists.
- Use a column layout only when the list has 6+ elements (instead of the
  current 4+ elements).

llvm-svn: 198869

10 years agoThe OpenCL specification states that images are allocated
Pekka Jaaskelainen [Thu, 9 Jan 2014 13:37:30 +0000 (13:37 +0000)]
The OpenCL specification states that images are allocated
from the global address space (6.5.1 of the OpenCL 1.2 specification).
This makes clang construct the image arguments in the global address
space and generate the argument metadata with the correct address space
descriptor.

Patch by Pedro Ferreira!

llvm-svn: 198868

10 years agocheck-clang: Add dependencies to PrintFunctionNames and SampleAnalyzerPlugin, for...
NAKAMURA Takumi [Thu, 9 Jan 2014 13:26:02 +0000 (13:26 +0000)]
check-clang: Add dependencies to PrintFunctionNames and SampleAnalyzerPlugin, for r198747 and r198820.

llvm-svn: 198867

10 years agoRevert r198851, "Prototype of skeleton type units for fission"
NAKAMURA Takumi [Thu, 9 Jan 2014 13:08:00 +0000 (13:08 +0000)]
Revert r198851, "Prototype of skeleton type units for fission"

It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess.

llvm-svn: 198865

10 years agoFixed old typo in ScalarEvolution, that caused wrong SCEVs zext operation.
Stepan Dyatkovskiy [Thu, 9 Jan 2014 12:26:12 +0000 (12:26 +0000)]
Fixed old typo in ScalarEvolution, that caused wrong SCEVs zext operation.
Detailed description is here:
http://llvm.org/bugs/show_bug.cgi?id=18000#c16

For participation in bugfix process special thanks to David Wiberg.

llvm-svn: 198863

10 years ago[SystemZ] Fix RNSBG bug introduced by r197802
Richard Sandiford [Thu, 9 Jan 2014 11:28:53 +0000 (11:28 +0000)]
[SystemZ] Fix RNSBG bug introduced by r197802

The zext handling added in r197802 wasn't right for RNSBG.  This patch
restricts it to ROSBG, RXSBG and RISBG.  (The tests for RISBG were added
in r197802 since RISBG was the motivating example.)

llvm-svn: 198862

10 years agoHandle masked rotate amounts
Richard Sandiford [Thu, 9 Jan 2014 10:56:42 +0000 (10:56 +0000)]
Handle masked rotate amounts

At the moment we expect rotates to have the form:

   (or (shl X, Y), (shr X, Z))

where Y == bitsize(X) - Z or Z == bitsize(X) - Y.  This form means that
the (or ...) is undefined for Y == 0 or Z == 0.  This undefinedness can
be avoided by using Y == (C * bitsize(X) - Z) & (bitsize(X) - 1) or
Z == (C * bitsize(X) - Y) & (bitsize(X) - 1) for any integer C
(including 0, the most natural choice).

llvm-svn: 198861

10 years agoMatch the InstCombine form of rotates by X+C
Richard Sandiford [Thu, 9 Jan 2014 10:49:40 +0000 (10:49 +0000)]
Match the InstCombine form of rotates by X+C

InstCombine converts (sub 32, (add X, C)) into (sub 32-C, X),
so a rotate left of a 32-bit Y by X+C could appear as either:

   (or (shl Y, (add X, C)), (shr Y, (sub 32, (add X, C))))

without InstCombine or:

   (or (shl Y, (add X, C)), (shr Y, (sub 32-C, X)))

with it.

We already matched the first form.  This patch handles the second too.

llvm-svn: 198860

10 years agoRemove IR/Writer.h
Tobias Grosser [Thu, 9 Jan 2014 10:42:15 +0000 (10:42 +0000)]
Remove IR/Writer.h

This should fix the buildbots.

llvm-svn: 198859

10 years agoDisable LeakSanitizer in TableGen binaries, see PR18325
Kostya Serebryany [Thu, 9 Jan 2014 09:26:26 +0000 (09:26 +0000)]
Disable LeakSanitizer in TableGen binaries, see PR18325

llvm-svn: 198858

10 years agoFix leak in lib/CodeGen/CGException.cpp, PR18318
Kostya Serebryany [Thu, 9 Jan 2014 09:22:32 +0000 (09:22 +0000)]
Fix leak in lib/CodeGen/CGException.cpp, PR18318

Summary: This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318

Reviewers: chandlerc, dblaikie

Reviewed By: chandlerc

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2474

llvm-svn: 198857

10 years agoIn areVectorOperandsLaxBitCastable() allow bitcast between a vector and scalar.
Argyrios Kyrtzidis [Thu, 9 Jan 2014 07:58:22 +0000 (07:58 +0000)]
In areVectorOperandsLaxBitCastable() allow bitcast between a vector and scalar.

rdar://15779837.

llvm-svn: 198856

10 years ago[Mips] Reduce the number of type-casting calls.
Simon Atanasyan [Thu, 9 Jan 2014 07:52:31 +0000 (07:52 +0000)]
[Mips] Reduce the number of type-casting calls.

llvm-svn: 198855

10 years agoRevert r198819 - "Remove dead code."
Nadav Rotem [Thu, 9 Jan 2014 07:50:34 +0000 (07:50 +0000)]
Revert r198819 - "Remove dead code."

llvm-svn: 198854

10 years agoFix accidental use of the exotic "std::string::back()" method. Turns out it's
Lang Hames [Thu, 9 Jan 2014 05:29:59 +0000 (05:29 +0000)]
Fix accidental use of the exotic "std::string::back()" method. Turns out it's
new in C++11.

llvm-svn: 198853

10 years agoAdd an "-object-cache-dir=<string>" option to LLI. This option specifies the
Lang Hames [Thu, 9 Jan 2014 05:24:05 +0000 (05:24 +0000)]
Add an "-object-cache-dir=<string>" option to LLI. This option specifies the
root path to which object files managed by the LLIObjectCache instance should be
written. This option defaults to "", in which case objects are cached in the
same directory as the bitcode they are derived from.

The load-object-a.ll test has been rewritten to use this option to support
testing in environments where the test directory is not writable.

llvm-svn: 198852

10 years agoPrototype of skeleton type units for fission
David Blaikie [Thu, 9 Jan 2014 05:08:28 +0000 (05:08 +0000)]
Prototype of skeleton type units for fission

llvm-svn: 198851

10 years agollvm-dwarfdump: type unit dwo support
David Blaikie [Thu, 9 Jan 2014 05:08:24 +0000 (05:08 +0000)]
llvm-dwarfdump: type unit dwo support

llvm-svn: 198850

10 years agoRevert "PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on"
Argyrios Kyrtzidis [Thu, 9 Jan 2014 05:01:04 +0000 (05:01 +0000)]
Revert "PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on"

It broke building.
This reverts commit r198845.

llvm-svn: 198849

10 years agollvm-readobj: address review comments for ARM EHABI printing
Saleem Abdulrasool [Thu, 9 Jan 2014 04:31:18 +0000 (04:31 +0000)]
llvm-readobj: address review comments for ARM EHABI printing

Rename bytecode to opcodes to make it more clear.  Change an impossible case to
llvm_unreachable instead.  Avoid allocation of a buffer by modifying the
PrintOpcodes iteration.

llvm-svn: 198848

10 years agollvm-readobj: fix endianness
Saleem Abdulrasool [Thu, 9 Jan 2014 04:31:14 +0000 (04:31 +0000)]
llvm-readobj: fix endianness

Explicitly handle endianness to ensure that bytes are read properly on
big-endian systems.

llvm-svn: 198847

10 years agoDwarfDebug: Refactor out common skeleton construction code to be reused for type...
David Blaikie [Thu, 9 Jan 2014 04:28:46 +0000 (04:28 +0000)]
DwarfDebug: Refactor out common skeleton construction code to be reused for type unit skeletons.

llvm-svn: 198846

10 years agoPR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on
Richard Smith [Thu, 9 Jan 2014 03:29:54 +0000 (03:29 +0000)]
PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on
SPARC, where uint64_t apparently requires higher alignment than void*.

llvm-svn: 198845

10 years agoExtend llvm::AlignedCharArrayUnion to support up to 10 arguments, as required by...
Richard Smith [Thu, 9 Jan 2014 03:28:55 +0000 (03:28 +0000)]
Extend llvm::AlignedCharArrayUnion to support up to 10 arguments, as required by Clang's APValue.

llvm-svn: 198844

10 years agoReformatting for r198842
David Blaikie [Thu, 9 Jan 2014 03:24:13 +0000 (03:24 +0000)]
Reformatting for r198842

llvm-svn: 198843

10 years agoDwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well.
David Blaikie [Thu, 9 Jan 2014 03:23:41 +0000 (03:23 +0000)]
DwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well.

Since we'll now also need the split dwarf file name along with the
language in DwarfTypeUnits, just use the whole DICompileUnit rather than
explicitly handling each field needed.

llvm-svn: 198842

10 years agoRevert "DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only"
David Blaikie [Thu, 9 Jan 2014 03:03:27 +0000 (03:03 +0000)]
Revert "DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only"

This reverts commit r198830.

Decided to go a different way with this...

llvm-svn: 198841

10 years agoUpdate Clang's CFGBlock interface to conform to the strange part of
Chandler Carruth [Thu, 9 Jan 2014 02:56:16 +0000 (02:56 +0000)]
Update Clang's CFGBlock interface to conform to the strange part of
LLVM's Value interface which is used in LLVM's DominatorTree analysis
and which changed in LLVM r198836.

The DominatorTree analysis is actually a generic graph analysis and
should be moved to LLVM's support library to clarify that Clang and
others are using it with arbitrary graphs. Further, it seems likely that
it should be using something other than printAsOperand, but this is
a simpler build fix. I'll clean this up later.

llvm-svn: 198840

10 years agoAdd a blank line to FileCheck input.
Rui Ueyama [Thu, 9 Jan 2014 02:47:52 +0000 (02:47 +0000)]
Add a blank line to FileCheck input.

FileCheck does not like the empty input file, so adding a blank line to workaround.

llvm-svn: 198839

10 years ago[PM] Rename this source file to something a bit more generic before
Chandler Carruth [Thu, 9 Jan 2014 02:39:45 +0000 (02:39 +0000)]
[PM] Rename this source file to something a bit more generic before
I add support for the new pass manager to it.

llvm-svn: 198838

10 years agoFix the clang -Werror build after r198818
David Blaikie [Thu, 9 Jan 2014 02:34:06 +0000 (02:34 +0000)]
Fix the clang -Werror build after r198818

llvm-svn: 198837

10 years agoPut the functionality for printing a value to a raw_ostream as an
Chandler Carruth [Thu, 9 Jan 2014 02:29:41 +0000 (02:29 +0000)]
Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is.
That gives a more conistent organization to the IR printing interfaces
-- they are all attached to the IR objects themselves. Also, update all
the users.

This removes the 'Writer.h' header which contained only a single function
declaration.

llvm-svn: 198836

10 years agoPatch by Ari Grant
Enrico Granata [Thu, 9 Jan 2014 02:28:25 +0000 (02:28 +0000)]
Patch by Ari Grant

"Open LLDB and run:
(lldb) script print lldb.debugger.GetInputFileHandle()

This puts the debugger into a catatonic state and all interactions seem
to enter a black hole. The reason is that executing this commnand
actually *CLOSES* the input file handle and so all input is dropped on
the floor. Oof!

The fix is simple: flush a descriptor, instead of closing it, when
transferring ownership."

llvm-svn: 198835

10 years agoPR18401: Fix assert by implementing the current proposed direction of core
Richard Smith [Thu, 9 Jan 2014 02:22:22 +0000 (02:22 +0000)]
PR18401: Fix assert by implementing the current proposed direction of core
issue 1430. Don't allow a pack expansion to be used as an argument to an alias
template unless the corresponding parameter is a parameter pack.

llvm-svn: 198833

10 years agoReverted r198807, r198808, as they cause link errors in configure builds. Will look...
Alexander Kornienko [Thu, 9 Jan 2014 02:21:52 +0000 (02:21 +0000)]
Reverted r198807, r198808, as they cause link errors in configure builds. Will look at this later.

llvm-svn: 198832

10 years agoFix typo
Alp Toker [Thu, 9 Jan 2014 01:39:49 +0000 (01:39 +0000)]
Fix typo

llvm-svn: 198831

10 years agoDwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only
David Blaikie [Thu, 9 Jan 2014 01:20:14 +0000 (01:20 +0000)]
DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only

It's unused in DwarfTypeUnit, as is expected.

llvm-svn: 198830

10 years agoWrite temporary files to Output directory.
Rui Ueyama [Thu, 9 Jan 2014 01:11:51 +0000 (01:11 +0000)]
Write temporary files to Output directory.

llvm-svn: 198829

10 years ago[PECOFF] Add a test for r197803.
Rui Ueyama [Thu, 9 Jan 2014 01:11:48 +0000 (01:11 +0000)]
[PECOFF] Add a test for r197803.

llvm-svn: 198828

10 years agoRemove the test for endianness in configure.ac and regenerate.
Eric Christopher [Thu, 9 Jan 2014 01:09:57 +0000 (01:09 +0000)]
Remove the test for endianness in configure.ac and regenerate.

llvm-svn: 198825

10 years ago[ms-abi] Fixed failing lit test.
Warren Hunt [Thu, 9 Jan 2014 00:48:32 +0000 (00:48 +0000)]
[ms-abi] Fixed failing lit test.

This test adjustment was missing from the previous patch.

llvm-svn: 198822

10 years agoReplace fstream use with raw_fd_ostream.
Lang Hames [Thu, 9 Jan 2014 00:47:54 +0000 (00:47 +0000)]
Replace fstream use with raw_fd_ostream.

llvm-svn: 198821

10 years agoAdd a test for Static Analyzer checker plugins
Alp Toker [Thu, 9 Jan 2014 00:47:40 +0000 (00:47 +0000)]
Add a test for Static Analyzer checker plugins

llvm-svn: 198820

10 years agoRemove dead code.
Rafael Espindola [Thu, 9 Jan 2014 00:32:54 +0000 (00:32 +0000)]
Remove dead code.

llvm-svn: 198819

10 years ago[ms-abi] Refactor Microsoft Record Layout
Warren Hunt [Thu, 9 Jan 2014 00:30:56 +0000 (00:30 +0000)]
[ms-abi] Refactor Microsoft Record Layout

This patch refactors microsoft record layout to be more "natural".  The
most dominant change is that vbptrs and vfptrs are injected after the
fact.  This simplifies the implementation and the math for the offest
for the first base/field after the vbptr.

llvm-svn: 198818

10 years agoUse the existing typedef to avoid forming a reference to a reference.
Rafael Espindola [Thu, 9 Jan 2014 00:25:25 +0000 (00:25 +0000)]
Use the existing typedef to avoid forming a reference to a reference.

llvm-svn: 198817

10 years agollvm.experimental.stackmap: fix encoding of large constants.
Andrew Trick [Thu, 9 Jan 2014 00:22:31 +0000 (00:22 +0000)]
llvm.experimental.stackmap: fix encoding of large constants.

In the stackmap format we advertise the constant field as signed.
However, we were determining whether to promote to a 64-bit constant
pool based on an unsigned comparison.

This fix allows -1 to be encoded as a small constant.

llvm-svn: 198816

10 years agoUsed the DataLayout methods instead of the Module methods.
Rafael Espindola [Thu, 9 Jan 2014 00:17:51 +0000 (00:17 +0000)]
Used the DataLayout methods instead of the Module methods.

llvm-svn: 198815

10 years agoImplement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()
Alp Toker [Thu, 9 Jan 2014 00:13:52 +0000 (00:13 +0000)]
Implement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()

It's not worth keeping two copies of the identifier init and comparison code
just to save a pointer coparison.

This should reduce further once we get proper contextual keywords in the token
stream, so having the identifier checks in one place is a step towards that.

Cleanup only.

llvm-svn: 198814

10 years agoSimplify/collapse/denest a conditions/blocks.
David Blaikie [Thu, 9 Jan 2014 00:13:35 +0000 (00:13 +0000)]
Simplify/collapse/denest a conditions/blocks.

llvm-svn: 198813

10 years agoAdd missing triples so that these tests pass on 32 bit arch.
Rui Ueyama [Thu, 9 Jan 2014 00:07:20 +0000 (00:07 +0000)]
Add missing triples so that these tests pass on 32 bit arch.

llvm-svn: 198812

10 years agoRoll back r198729; it seems to be causing two testsuite failures if llvm is built...
Jason Molenda [Thu, 9 Jan 2014 00:02:17 +0000 (00:02 +0000)]
Roll back r198729; it seems to be causing two testsuite failures if llvm is built with asserts -

210: test_with_dsym_and_run_command (Test-rdar-10642615.Radar10642615DataFormatterTestCase)
     Test data formatter commands. ... Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239.

     226: test_with_dsym_and_run_command (Test-rdar-13338477.Radar13338477DataFormatterTestCase)
         Test that LLDB handles the clang typeclass Paren correctly. ... Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239.

llvm-svn: 198811

10 years agoRoll back my change to r198729; I'm going to revert it entirely.
Jason Molenda [Thu, 9 Jan 2014 00:00:53 +0000 (00:00 +0000)]
Roll back my change to r198729; I'm going to revert it entirely.

llvm-svn: 198810

10 years agoRevert the vector part of Enrico's change in r198729;
Jason Molenda [Wed, 8 Jan 2014 23:35:54 +0000 (23:35 +0000)]
Revert the vector part of Enrico's change in r198729;
it is causing an llvm assert when run against
test/functionalities/data-formatter/rdar-10642615,

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239.

llvm-svn: 198809

10 years agoUpdated file comment.
Alexander Kornienko [Wed, 8 Jan 2014 23:35:01 +0000 (23:35 +0000)]
Updated file comment.

llvm-svn: 198808

10 years agoRestructured code, no functional changes.
Alexander Kornienko [Wed, 8 Jan 2014 23:30:40 +0000 (23:30 +0000)]
Restructured code, no functional changes.

Summary:
Moved implementation of classes declared in
ClangTidyDiagnosticConsumer.h to ClangTidyDiagnosticConsumer.cpp.
Added a FIXME note in ClangTidyDiagnosticConsumer::HandleDiagnostic.

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2520

llvm-svn: 198807

10 years agollvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo equivalents
David Blaikie [Wed, 8 Jan 2014 23:29:59 +0000 (23:29 +0000)]
llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo equivalents

This makes it easier to write a test that's mostly shared between
fission and non-fission (using FileCheck's multiple prefix support).

llvm-svn: 198806

10 years agoAttempting a fix the build bots should be happier with. Amends 198804.
Aaron Ballman [Wed, 8 Jan 2014 23:26:53 +0000 (23:26 +0000)]
Attempting a fix the build bots should be happier with. Amends 198804.

llvm-svn: 198805

10 years agoSilencing an MSVC warning about control reaching the end of a non-void function.
Aaron Ballman [Wed, 8 Jan 2014 23:08:41 +0000 (23:08 +0000)]
Silencing an MSVC warning about control reaching the end of a non-void function.

llvm-svn: 198804

10 years agoFix the C++03 build.
Rafael Espindola [Wed, 8 Jan 2014 22:27:04 +0000 (22:27 +0000)]
Fix the C++03 build.

With c++11 we never instantiate the copy constructor.

llvm-svn: 198803

10 years agoOnly check os version for POSIX_SPAWN_CLOEXEC_DEFAULT on desktop builds of LLDB.
Greg Clayton [Wed, 8 Jan 2014 22:12:52 +0000 (22:12 +0000)]
Only check os version for POSIX_SPAWN_CLOEXEC_DEFAULT on desktop builds of LLDB.

llvm-svn: 198800

10 years agoUse getError and remove the error_code operator.
Rafael Espindola [Wed, 8 Jan 2014 22:03:39 +0000 (22:03 +0000)]
Use getError and remove the error_code operator.

llvm-svn: 198799

10 years ago[Mips] Remove unnecessary #include pragma.
Simon Atanasyan [Wed, 8 Jan 2014 22:00:35 +0000 (22:00 +0000)]
[Mips] Remove unnecessary #include pragma.

llvm-svn: 198798

10 years agoUse getError instead of the error_code operator.
Rafael Espindola [Wed, 8 Jan 2014 22:00:09 +0000 (22:00 +0000)]
Use getError instead of the error_code operator.

llvm-svn: 198797

10 years agoRemove vestigal bits of MC from the mangler. It no longer uses this, and
Chandler Carruth [Wed, 8 Jan 2014 21:59:22 +0000 (21:59 +0000)]
Remove vestigal bits of MC from the mangler. It no longer uses this, and
having the include could cause weird layering problems between the IR
and MC libraries.

llvm-svn: 198796

10 years agoConservatively handle multiple MMOs in MIsNeedChainEdge
Hal Finkel [Wed, 8 Jan 2014 21:52:02 +0000 (21:52 +0000)]
Conservatively handle multiple MMOs in MIsNeedChainEdge

MIsNeedChainEdge, which is used by -enable-aa-sched-mi (AA in misched), had an
llvm_unreachable when -enable-aa-sched-mi is enabled and we reach an
instruction with multiple MMOs. Instead, return a conservative answer. This
allows testing -enable-aa-sched-mi on x86.

Also, this moves the check above the isUnsafeMemoryObject checks.
isUnsafeMemoryObject is currently correct only for instructions with one MMO
(as noted in the comment in isUnsafeMemoryObject):

  // We purposefully do no check for hasOneMemOperand() here
  // in hope to trigger an assert downstream in order to
  // finish implementation.

The problem with this is that, had the candidate edge passed the
"!MIa->mayStore() && !MIb->mayStore()" check, the hoped-for assert would never
happen (which could, in theory, lead to incorrect behavior if one of these
secondary MMOs was volatile, for example).

llvm-svn: 198795

10 years agoMove declaration of variables down to first use.
Matt Arsenault [Wed, 8 Jan 2014 21:47:14 +0000 (21:47 +0000)]
Move declaration of variables down to first use.

llvm-svn: 198794

10 years agoAdd missing definitions of key_type and value_type to DenseSet.
Matt Arsenault [Wed, 8 Jan 2014 21:38:04 +0000 (21:38 +0000)]
Add missing definitions of key_type and value_type to DenseSet.

This matches std::set and allows using DenseSet with the functions
in SetOperations.h

llvm-svn: 198793

10 years agoAdd get and getError methods to ErrorOr.
Rafael Espindola [Wed, 8 Jan 2014 21:17:09 +0000 (21:17 +0000)]
Add get and getError methods to ErrorOr.

ErrorOr is modeled after boost::optional which has a get method.

llvm-svn: 198792

10 years ago[AArch64][NEON] Added UXTL and UXTL2 instruction aliases
Ana Pazos [Wed, 8 Jan 2014 21:02:13 +0000 (21:02 +0000)]
[AArch64][NEON] Added UXTL and UXTL2 instruction aliases

llvm-svn: 198791

10 years ago[Mips] GOT16 relocation against non-local symbol does not require a
Simon Atanasyan [Wed, 8 Jan 2014 20:43:03 +0000 (20:43 +0000)]
[Mips] GOT16 relocation against non-local symbol does not require a
paired LO16 relocation.

llvm-svn: 198790

10 years ago[Mips] Add assert to check that we handle all paired relocations.
Simon Atanasyan [Wed, 8 Jan 2014 20:42:52 +0000 (20:42 +0000)]
[Mips] Add assert to check that we handle all paired relocations.

llvm-svn: 198789

10 years ago[Mips] Factor out the code determines type of GOT entry (local/global)
Simon Atanasyan [Wed, 8 Jan 2014 20:42:45 +0000 (20:42 +0000)]
[Mips] Factor out the code determines type of GOT entry (local/global)
into the separate function.

llvm-svn: 198788

10 years ago[Mips] Do not use standard relocation identifier R_MIPS_NONE for
Simon Atanasyan [Wed, 8 Jan 2014 20:42:38 +0000 (20:42 +0000)]
[Mips] Do not use standard relocation identifier R_MIPS_NONE for
internal purpose. Use special LLD_R_MIPS_GLOBAL_GOT constant for that.

llvm-svn: 198787

10 years ago[Mips] Rename function to better reflect its purpose.
Simon Atanasyan [Wed, 8 Jan 2014 20:42:30 +0000 (20:42 +0000)]
[Mips] Rename function to better reflect its purpose.

llvm-svn: 198786