Commit Graph

151612 Commits

Author SHA1 Message Date
Edwin Vane 4e11abb59b cpp11-migrate: Transform now responsible for file content overriding
To better support per-translation unit replacements, any real work is being
moved out of ActionFactory and into Transform. In this revision, that means
file override application.

For simplification, Transform no longer inherits from SourceFileCallbacks.
TransformTest required updating as a result.

llvm-svn: 184098
2013-06-17 18:18:15 +00:00
Howard Hinnant 862c4a06ee Demangler update: This now demangles many more (all?) C++11 symbols. Demangler tests updated.
llvm-svn: 184097
2013-06-17 18:10:34 +00:00
Richard Smith 1a359c5b01 Avoid using __SIZE_TYPE__ in a -std=c++98 -pedantic-errors test, because that
triggers an error on MS targets where __SIZE_TYPE__ expands to 'long long'.

llvm-svn: 184096
2013-06-17 18:05:42 +00:00
Rafael Espindola 40c908bfad Don't use PathV1.h in LTOCodeGenerator.cpp
This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.

llvm-svn: 184095
2013-06-17 18:05:35 +00:00
Michael Sartain d55eadf0be Add newer Linux AT_ defines from elf.h.
llvm-svn: 184094
2013-06-17 17:44:53 +00:00
Fariborz Jahanian aaddc09b39 unbreak buildbot for now.
llvm-svn: 184093
2013-06-17 17:41:13 +00:00
Rafael Espindola f1f1273682 Don't use PathV1.h in llvm-link.
llvm-svn: 184092
2013-06-17 17:32:19 +00:00
Rui Ueyama c444241e41 [Passes][GOT] Split perform() into small predicate functions for readability sake.
Reviewers: shankarke

CC: llvm-commits

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

llvm-svn: 184091
2013-06-17 17:29:46 +00:00
Rafael Espindola 1600a53bc0 Include PathV1.h only where it is used.
llvm-svn: 184090
2013-06-17 17:23:47 +00:00
Nadav Rotem cde24ef389 Disable vectorization for -Oz.
llvm-svn: 184089
2013-06-17 17:22:40 +00:00
Serge Pavlov f7c1a2152a Clean up empty struct/union recognition.
Make use of getTypeSizeInChars to detect structs/unions of zero size. It allows
more accurate detection of types of zero size. It however has a side effect -
sequence of used types may change, that is why the test 'override-layout' was
modified.

llvm-svn: 184088
2013-06-17 17:18:51 +00:00
Rafael Espindola 69817016cf Delete declared but not implemented functions.
llvm-svn: 184087
2013-06-17 17:15:00 +00:00
Fariborz Jahanian 7548167845 Objective-C [qoi]: Provide fixit hint when message with typo
is sent to a receiver object. This is wip. // rdar://7853549

llvm-svn: 184086
2013-06-17 17:10:54 +00:00
Rui Ueyama d95a155af6 [PECOFF] Connect defined atoms with layout before/after edges.
Reviewers: shankarke

CC: llvm-commits

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

llvm-svn: 184085
2013-06-17 16:59:54 +00:00
Nadav Rotem 7dd8210b71 Enable the loop vectorizer by default for -Os and -O2.
llvm-svn: 184084
2013-06-17 16:23:34 +00:00
Rafael Espindola ac5c1b0d68 Move lib/Archive to tools/llvm-ar.
llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.

llvm-svn: 184083
2013-06-17 15:47:20 +00:00
Michael Sartain c493bd1f59 Remove extra modules.Append() as it causes dupes in the m_images array. (Used with image list, etc.)
llvm-svn: 184082
2013-06-17 15:35:42 +00:00
Rafael Espindola 28c2e33362 Don't link with the archive library programs that don't use it.
llvm-svn: 184081
2013-06-17 15:29:46 +00:00
Rafael Espindola 81955cbcf5 Add a testcase for r184074.
llvm-svn: 184080
2013-06-17 14:00:41 +00:00
Reid Kleckner 724c21c05b [Driver] Remove the using namespace directives from headers
This adds a bunch of llvm::opt name specifiers to all the uses of types
from that namespace.

Reviewers: espindola

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

llvm-svn: 184079
2013-06-17 13:59:19 +00:00
Alexander Kornienko afaa8f556b Fix a problem in ExpressionParser leading to trailing comments affecting indentation of an expression after a line break.
Summary:
E.g. the second line in 

return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
           b; //

is indented 4 characters more than in

return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
       b;

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 184078
2013-06-17 13:19:53 +00:00
Reid Kleckner 3ff679a19a Try to fix the bots with a forward decl.
llvm-svn: 184077
2013-06-17 13:05:47 +00:00
Alexander Kornienko 4d26b6efef Fixes incorrect indentation of line comments after break and re-alignment.
Summary:
Selectively propagate the information about token kind in
WhitespaceManager::replaceWhitespaceInToken.For correct alignment of new
segments of line comments in order to align them correctly. Don't set
BreakBeforeParameter in breakProtrudingToken for line comments, as it introduces
a break after the _next_ parameter. Added tests for related functions.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 184076
2013-06-17 12:59:44 +00:00
Reid Kleckner 2ab0ac5360 [AST] Don't include RecursiveASTVisitor.h in ASTContext.h
The untemplated implementation of getParents() doesn't need to be in a
header file.

RecursiveASTVisitor.h is full of repeated macro expansion.  Moving this
include to ASTContext.cpp speeds up compilation of
LambdaMangleContext.cpp, a small C++ file with few includes, from 3.7s
to 2.8s for me locally.  I haven't measured a full build, but it can't
hurt.

I had to fix a few static analyzer files that were depending on
transitive includes of C++ AST headers.

Reviewers: rsmith, klimek

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

llvm-svn: 184075
2013-06-17 12:56:08 +00:00
Manuel Klimek 52772bf356 Fix incorrectly finding 'executable' directories instead of files.
This broke for example the 'not' utility, if a directory called
'FileCheck' is executable and in the path before the actual 'FileCheck'.

This patch steals the implementation of the "old" PathV1 canExecute
implementation:
- checks for R_OK (file readable): this is necessary for executing
  scripts; we should not regress here unless we have good reasons
- checks for S_ISREG; if we want to get rid of this, we'd need to
  change all callers who already made the assumption when depending
  on Path V1.

llvm-svn: 184074
2013-06-17 10:48:34 +00:00
Larisse Voufo e4fb3dc7d4 Corrected status of support for contextual conversion from full to SVN
llvm-svn: 184073
2013-06-17 05:37:15 +00:00
Tim Northover 8b7498e441 AArch64: print relocation addends if present on AArch64
llvm-objdump should provide some way of printing out the addends present in the
.rela sections for debugging purposes if nothing else.

llvm-svn: 184072
2013-06-17 03:03:06 +00:00
Shankar Easwaran f91031efcf [ELF] Add more sections to the default section map.
This change adds functionality to add more sections like .gcc_except_table,
.data.rel.local, .data.rel.ro into the default section map, so that they are
all merged into appropriate output sections.

This also makes c++ static binaries comparable to what you get with the default
linker.

Adds a test for testing the functionality.

llvm-svn: 184071
2013-06-17 02:29:36 +00:00
Richard Smith 3b08dcd4cc Remove unused file.
llvm-svn: 184070
2013-06-17 01:34:23 +00:00
Richard Smith f2c9afceef C++11: don't warn about the deprecated 'register' keyword if it's combined with
an asm label.

llvm-svn: 184069
2013-06-17 01:34:01 +00:00
Richard Smith 37ba45a3c5 Add warning group -Wdeprecated-register for C++11 warning on 'register' being
deprecated.

llvm-svn: 184068
2013-06-17 00:01:58 +00:00
David Blaikie b735b4d6db DebugInfo: remove target-specific Frame Index handling for DBG_VALUE MachineInstrs
Frame index handling is now target-agnostic, so delete the target hooks
for creation & asm printing of target-specific addressing in DBG_VALUEs
and any related functions.

llvm-svn: 184067
2013-06-16 20:34:27 +00:00
David Blaikie 0252265be0 Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions
Rather than using the full power of target-specific addressing modes in
DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This
reduces the complexity of debug info handling down to two
representations of values (reg+offset and frame index+offset) rather
than three or four.

Ideally we could ensure that frame indicies had been eliminated by the
time we reached an assembly or dwarf generation, but I haven't spent the
time to figure out where the FIs are leaking through into that & whether
there's a good place to convert them. Some FI+offset=>reg+offset
conversion is done (see PrologEpilogInserter, for example) which is
necessary for some SelectionDAG assumptions about registers, I believe,
but it might be possible to make this a more thorough conversion &
ensure there are no remaining FIs no matter how instruction selection
is performed.

llvm-svn: 184066
2013-06-16 20:34:15 +00:00
David Blaikie 80d0554949 MachineOperand::setIsDebug should ensure the register is /not/ a definition
This currently unused function appeared to be asserting in the wrong
direction - DebugValues are never definitions of registers, only uses.
Curiously we don't perform any of these checks for the more common (&
actually used) case of MachineOperand::CreateReg (or other Create
functions).

llvm-svn: 184065
2013-06-16 20:34:09 +00:00
Tobias Grosser c00bd98695 Update to a newer CLooG version
This update fixes the test cases to give correct results with the isl version
we are currently using.

llvm-svn: 184064
2013-06-16 19:55:07 +00:00
Rui Ueyama 8d10164326 [lld][PECOFF] Support IMAGE_REL_I386_DIR32 relocation.
With this patch, it can now resolve relocations in the same output file.
"Hello world" program does not still work because call to the DLL routine
is not supported yet.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 184063
2013-06-16 17:25:17 +00:00
Rui Ueyama c26eabe32b [lld] Move AtomLayout from ELF to Core so that it can be used by non-ELF writers.
Summary: I'm planning to use AtomLayout in WriterPECOFF.

Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 184062
2013-06-16 17:25:14 +00:00
Rui Ueyama e96044a370 [lld] Move AtomLayout from ELF to ReaderWriter so that it can be used by non-ELF writers.
Reviewers: Bigcheese

CC: llvm-commits

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

llvm-svn: 184061
2013-06-16 17:14:58 +00:00
Shankar Easwaran a97f12e00a [ELF] Add test so that _end value is set appropriately for NMAGIC/OMAGIC executables(Fix comment from espindola)
llvm-svn: 184060
2013-06-16 15:06:18 +00:00
Benjamin Kramer e9d5fb09a3 Silence warning in Release builds.
llvm-svn: 184059
2013-06-16 11:29:48 +00:00
Benjamin Kramer 2b004debde Fix typo in comment. Found by -Wdocumentation.
llvm-svn: 184058
2013-06-16 11:09:47 +00:00
Richard Smith 895d6952d6 Add tests for C++ DR100-150.
llvm-svn: 184057
2013-06-16 08:00:51 +00:00
Richard Smith d9576c9484 Add testcase for DR39 from PR5916.
llvm-svn: 184056
2013-06-16 05:11:56 +00:00
Shankar Easwaran a42a473893 [ELF] add NMAGIC/OMAGIC support
llvm-svn: 184055
2013-06-16 05:06:28 +00:00
Richard Smith 089ee1554c PR16339: Don't produce a diagnostic pointing at the whitespace between a '#if'
and a '!defined(X)' if we find a broken header guard. This is suboptimal; we
should point the diagnostic at the 'X' token not the 'if' token, but it fixes
the crash.

llvm-svn: 184054
2013-06-16 05:05:39 +00:00
Larisse Voufo d1336faf53 Fixed one buildbot-failure-causing bug...
llvm-svn: 184053
2013-06-16 04:34:07 +00:00
Dmitri Gribenko 070a10e63a ArrayRef'ize Sema::CodeComplete*
Patch by Robert Wilhelm.

llvm-svn: 184052
2013-06-16 03:47:57 +00:00
Dmitri Gribenko 702d8f01b7 Put back variable names because they are referenced in the documentation
comment.

llvm-svn: 184051
2013-06-16 03:22:56 +00:00
Rui Ueyama 4a4079e839 [WinLink] Support /nxcompat command line option.
llvm-svn: 184050
2013-06-16 03:07:08 +00:00
Larisse Voufo 492a6af72f Updated status of support for contextual conversion from partial to full
llvm-svn: 184049
2013-06-15 20:26:23 +00:00