Commit Graph

151242 Commits

Author SHA1 Message Date
Dan Gohman 6a0c9ae4f9 Print ConstantPool entries initialized to Values with WriteAsOperand instead of
operator<< so that functions are printed as just their name instead of as their
entire definition, which is excessively verbose in this context.

llvm-svn: 183871
2013-06-12 22:19:19 +00:00
Rui Ueyama 2e3c4025ae [PECOFF] Rename basic.test -> trivial.test.
Because the test does not actually cover basic features.

llvm-svn: 183870
2013-06-12 22:19:05 +00:00
Richard Smith e3b28bc363 Move detection of reference members binding to temporaries from building of
CXXCtorInitializers to the point where we perform the questionable lifetime
extension. This exposed a selection of false negatives in the warning.

llvm-svn: 183869
2013-06-12 21:51:50 +00:00
Rafael Espindola 0c24b20d33 [Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.
llvm-svn: 183868
2013-06-12 21:25:04 +00:00
Richard Trieu 33a4b3db0d Introducing -Wheader-guard, a warning that checks header guards actually work
properly.  This warning checks that the #ifndef and #define directives at
the beginning of a header refer to the same macro name.  Includes a fix-it
hint to correct the header guard.

llvm-svn: 183867
2013-06-12 21:20:57 +00:00
Rafael Espindola 2bb2aa27bf s/Void/void.
llvm-svn: 183866
2013-06-12 21:16:07 +00:00
Rafael Espindola 404ae77e38 Attempt at fixing the windows build.
llvm-svn: 183865
2013-06-12 21:11:50 +00:00
Rafael Espindola cb2eca0f91 Remove the program class.
It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just
those two functions and make Execute and Wait implementations details.

llvm-svn: 183864
2013-06-12 20:58:35 +00:00
David Blaikie c2467c4e9b Revert r183854 (PPC: Fix switch warnings from r183841)
Now that the PRED_BAD has been removed, this is failing the Clang
-Werror build due to -Wcovered-switch-default.

llvm-svn: 183863
2013-06-12 20:57:32 +00:00
Rafael Espindola 6ba87f65e6 Use the global functions instead of the Program methods.
llvm-svn: 183862
2013-06-12 20:47:14 +00:00
Rafael Espindola a3346d8765 Use the global functions instead of the Program methods.
llvm-svn: 183861
2013-06-12 20:44:26 +00:00
Rafael Espindola 35ac91c932 Add global versions of some Program static methods.
This is a temporary stepping stone for moving them out of Program.

llvm-svn: 183860
2013-06-12 20:42:59 +00:00
Richard Smith 736a947bdc Reapply r183721, reverted in r183776, with a fix for a bug in the former (we
were lacking ExprWithCleanups nodes in some cases where the new approach to
lifetime extension needed them).

Original commit message:

Rework IR emission for lifetime-extended temporaries. Instead of trying to walk
into the expression and dig out a single lifetime-extended entity and manually
pull its cleanup outside the expression, instead keep a list of the cleanups
which we'll need to emit when we get to the end of the full-expression. Also
emit those cleanups early, as EH-only cleanups, to cover the case that the
full-expression does not terminate normally. This allows IR generation to
properly model temporary lifetime when multiple temporaries are extended by the
same declaration.

We have a pre-existing bug where an exception thrown from a temporary's
destructor does not clean up lifetime-extended temporaries created in the same
expression and extended to automatic storage duration; that is not fixed by
this patch.

llvm-svn: 183859
2013-06-12 20:42:33 +00:00
Bill Schmidt 4fcb8c260e [PowerPC] Remove PRED_BAD from PPC::Predicate enumeration.
I'm taking David Blaikie's suggestion to use an
Optional<PPC::Predicate> return value instead.  That's the right
solution for this problem.  Thanks for pointing out that possibility!

llvm-svn: 183858
2013-06-12 20:22:24 +00:00
Andy Gibbs 30feecd2a7 Retain linker flags specified on cmake command line.
llvm-svn: 183857
2013-06-12 20:02:59 +00:00
Edwin Vane 59175a1523 cpp11-migrate: Decluttering Transform.h
Moving RewriteContainer's constructor impl to Transform.cpp to reduce clutter.
More things will soon be added to this header.

llvm-svn: 183856
2013-06-12 19:58:21 +00:00
Edwin Vane a6bbcdd707 cpp11-migrate: New mechanism for overriding file contents
Next step toward supporting migrating headers. Instead of using ClangTool's
ability to override all files at once, use a custom FrontendAction and override
only the source (and eventually headers) the action is about to parse.

Use of newFrontendActionFactory() is replaced with a new factory maker provided
by Transform.

llvm-svn: 183855
2013-06-12 19:52:13 +00:00
Bill Schmidt 31c60f740e [PowerPC] Fix switch warnings from r183841.
Introducing PRED_BAD caused some unexpected warnings that are now
suppressed.

llvm-svn: 183854
2013-06-12 19:20:32 +00:00
Rui Ueyama 0e17c37c57 [PECOFF] Test for r183705.
llvm-svn: 183853
2013-06-12 19:13:27 +00:00
Rui Ueyama 82ebd8e36d readobj: Dump PE/COFF optional records.
These records are mandatory for executables and are used by the loader.

Reviewers: rafael

CC: llvm-commits

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

llvm-svn: 183852
2013-06-12 19:10:33 +00:00
Alexander Kornienko f370ad9055 Preserve newlines before block comments in static initializers.
Summary:
Basically, don't special-case line comments in this regard. And fixed
an incorrect test, that relied on the wrong behavior.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 183851
2013-06-12 19:04:12 +00:00
Rui Ueyama 969e70265a [ELF] Remove unused parameter from ELFReference c'tor.
Reviewers: shankarke

CC: llvm-commits

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

llvm-svn: 183850
2013-06-12 18:21:36 +00:00
Benjamin Kramer fbf914ceb0 Port HTMLDiagnostics to PathV2. No intended functionality change.
llvm-svn: 183849
2013-06-12 18:13:05 +00:00
Eli Friedman c68dbeffe3 Fix buildbot breakage on PPC64.
llvm-svn: 183847
2013-06-12 17:31:32 +00:00
Daniel Malea 31ebbed47a If using clang 3.4, skip tests affected by llvm.org/pr16214
- clang emits incomplete DWARF information for structures referenced via typedef

llvm-svn: 183846
2013-06-12 16:48:33 +00:00
Rafael Espindola 8d30480344 Always remove an alias when we rename the target.
Should fix the dragonegg build bots.

llvm-svn: 183845
2013-06-12 16:45:47 +00:00
Bill Schmidt 230b451389 [PowerPC] Expose some calling convention functions in PPCISelLowering.h.
This is a preparatory patch for fast-isel support.  The instruction
selector will need to access some functions in PPCGenCallingConv.inc,
which in turn requires several helper functions to be defined.  These
are currently defined near the only use of PCCGenCallingConv.inc,
inside PPCISelLowering.cpp.  This patch moves the declaration of the
functions into the associated header file to provide the needed
visibility.

No functional change intended.

llvm-svn: 183844
2013-06-12 16:39:22 +00:00
Rafael Espindola fb3fc0bf34 Convert test to FileCheck.
llvm-svn: 183843
2013-06-12 16:35:53 +00:00
Rafael Espindola 385c06ffc9 Don't use PathV1 in CommandLine.cpp.
No functionality change.

llvm-svn: 183842
2013-06-12 15:37:27 +00:00
Bill Schmidt 6207a4b7dd Add artificial PRED_BAD to PPC::Predicate enumeration.
Allows returning a PPC::Predicate from a function with a no-predicate
value possible.  Preparatory patch for fast-isel on PPC64 ELF.  No
behavioral change intended.

llvm-svn: 183841
2013-06-12 15:14:42 +00:00
Rafael Espindola 71affba988 Inline Path::isBitcodeFile into only use and remove it.
llvm-svn: 183840
2013-06-12 15:13:57 +00:00
Rafael Espindola b703be2544 Remove Path::getMagicNumber.
llvm-svn: 183839
2013-06-12 15:07:11 +00:00
Rafael Espindola e3e790a46e Remove Path::hasMagicNumber.
llvm-svn: 183838
2013-06-12 15:04:59 +00:00
Aaron Ballman 6a30264ec3 Silencing a signed vs unsigned comparison mismatch in MSVC.
llvm-svn: 183837
2013-06-12 15:03:45 +00:00
Rafael Espindola af93517dde Remove Path::isAbsolute.
llvm-svn: 183836
2013-06-12 15:02:39 +00:00
Rafael Espindola 87b03450ee Remove Path::isAbsolute().
llvm-svn: 183835
2013-06-12 14:47:33 +00:00
Ulrich Weigand 32d725b80a [MC/DWARF] Support .debug_frame / .debug_line code alignment factors
I've been comparing the object file output of LLVM's integrated
assembler against the external assembler on PowerPC, and one
area where differences still remain are in DWARF sections.

In particular, the GNU assembler generates .debug_frame and
.debug_line sections using a code alignment factor of 4, since
all PowerPC instructions have size 4 and must be aligned to a
multiple of 4.  However, current MC code hard-codes a code
alignment factor of 1.

This patch changes this by adding a "minimum instruction alignment"
data element to MCAsmInfo and using this as code alignment factor.

This requires passing a MCContext into MCDwarfLineAddr::Encode
and MCDwarfLineAddr::EncodeAdvanceLoc.  Note that one caller,
MCDwarfLineAddr::Write, didn't actually have that information
available.  However, it turns out that this routine is in fact
never used in the whole code base, so the patch simply removes
it.  If it turns out to be needed again at a later time, it
could be re-added with an updated interface.

llvm-svn: 183834
2013-06-12 14:46:54 +00:00
Rafael Espindola 46e2ea64cc Remove Path::getSuffix.
llvm-svn: 183833
2013-06-12 14:32:51 +00:00
Ashok Thirumurthi 5e75455062 LLDB feature status update to mention limitations with core-file debugging and exec.
llvm-svn: 183832
2013-06-12 14:26:58 +00:00
Rafael Espindola ec4f0fc7c1 Remove sys::CopyFile.
llvm-svn: 183831
2013-06-12 14:16:52 +00:00
Patrik Hagglund 7e79636e19 Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm:🆑:GenericOptionValue').

Remove an "anchor" method for an abstract class. (This does not
increase the number of vtables.)

llvm-svn: 183830
2013-06-12 14:15:21 +00:00
Ulrich Weigand d45c68cb9c [PowerPC] Use assembler source in MC tests
A couple of old test cases in test/MC/PowerPC were still using
LLVM IR.  Now that we have a working assembler, we can move
them to assembler tests instead:
  ppc64-initial-cfa.ll
  ppc64-relocs-01.ll
  ppc64-tls-relocs-01.ll

llvm-svn: 183829
2013-06-12 14:14:18 +00:00
Rafael Espindola d88308767b Remove the old file memory mapping functions.
llvm-svn: 183828
2013-06-12 14:11:15 +00:00
Rafael Espindola 1d08f5ae7c Remove Path::createFileOnDisk.
llvm-svn: 183827
2013-06-12 13:59:17 +00:00
Rafael Espindola d5fd942ec3 Remove Path::makeExecutableOnDisk.
llvm-svn: 183826
2013-06-12 13:55:07 +00:00
Renato Golin 11cb23a6f7 Update Release Process doc
llvm-svn: 183825
2013-06-12 11:35:33 +00:00
Patrik Hagglund 0cc888b786 Fix gcc -flto build, by adding LLVM_ATTRIBUTE_USED to
LLVMX86CompilationCallback2, called from inline asm.

llvm-svn: 183824
2013-06-12 08:45:39 +00:00
Pavel Labath 7e18009a7a Fix memory corruption in CStringChecker
Summary:
"register" functions for the checker were caching the checker objects in a
static variable. This caused problems when the function is called with a
different CheckerManager.

Reviewers: klimek

CC: cfe-commits

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

llvm-svn: 183823
2013-06-12 07:45:04 +00:00
Enrico Granata 9b62d1d5ee <rdar://problem/11914077>
If you type help command <word> <word> <word> <missingSubCommand> (e.g. help script import or help type summary fake), you will get help on the deepest matched command word (i.e. script or type summary in the examples)
Also, reworked the logic for commands to produce their help to make it more object-oriented

llvm-svn: 183822
2013-06-12 01:50:57 +00:00
Eli Friedman f045007f11 Add support for complex compound assignments where the LHS is a scalar.
Fixes <rdar://problem/11224126> and PR12790.

llvm-svn: 183821
2013-06-12 01:40:06 +00:00