platform/upstream/llvm.git
11 years agoUse the sys::ExecuteAndWait that takes StringRefs.
Rafael Espindola [Thu, 13 Jun 2013 20:08:52 +0000 (20:08 +0000)]
Use the sys::ExecuteAndWait that takes StringRefs.

Also don't depend on Program.h including PathV1.h.

llvm-svn: 183935

11 years agoAdd a version of sys::ExecuteAndWait that takes StringRefs.
Rafael Espindola [Thu, 13 Jun 2013 20:06:28 +0000 (20:06 +0000)]
Add a version of sys::ExecuteAndWait that takes StringRefs.

llvm-svn: 183934

11 years agoFix DeleteDeadVarargs not to crash on functions referenced by BlockAddresses
Derek Schuff [Thu, 13 Jun 2013 19:51:17 +0000 (19:51 +0000)]
Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddresses

This pass was assuming that if hasAddressTaken() returns false for a
function, the function's only uses are call sites.  That's not true
because there can be references by BlockAddresses too.

Fix the pass to handle this case.  Fix
BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type
to be changed by RAUW'ing the function with a bitcast of the recreated
function.

Patch by Mark Seaborn.

llvm-svn: 183933

11 years agoBe sure to print out the full file path when dumping breakpoint resolvers for file...
Greg Clayton [Thu, 13 Jun 2013 19:39:56 +0000 (19:39 +0000)]
Be sure to print out the full file path when dumping breakpoint resolvers for file and line when the full path was specified.

llvm-svn: 183932

11 years agoFix a small bug in the linkage computation for the lambda conversion-to-function...
Eli Friedman [Thu, 13 Jun 2013 19:39:48 +0000 (19:39 +0000)]
Fix a small bug in the linkage computation for the lambda conversion-to-function-pointer member.

llvm-svn: 183931

11 years agoUpdate for llvm change.
Rafael Espindola [Thu, 13 Jun 2013 19:25:45 +0000 (19:25 +0000)]
Update for llvm change.

llvm-svn: 183930

11 years agoUpdate for llvm change.
Rafael Espindola [Thu, 13 Jun 2013 19:25:41 +0000 (19:25 +0000)]
Update for llvm change.

llvm-svn: 183929

11 years agoHave sys::FindProgramByName return a std::string.
Rafael Espindola [Thu, 13 Jun 2013 19:25:37 +0000 (19:25 +0000)]
Have sys::FindProgramByName return a std::string.

llvm-svn: 183928

11 years agoMips: Remove global set.
Benjamin Kramer [Thu, 13 Jun 2013 19:06:52 +0000 (19:06 +0000)]
Mips: Remove global set.

Backends shouldn't retain any global state. No functionality change.

llvm-svn: 183927

11 years agoAllow clang to build __clear_cache on ARM.
Rafael Espindola [Thu, 13 Jun 2013 18:34:17 +0000 (18:34 +0000)]
Allow clang to build __clear_cache on ARM.

__clear_cache is special. It needs no signature, but is a real function in
compiler_rt or libgcc.

Patch by Andrew Turner.

llvm-svn: 183926

11 years agoMerge changes to clang's Driver code into LLVM's Option library
Reid Kleckner [Thu, 13 Jun 2013 18:12:12 +0000 (18:12 +0000)]
Merge changes to clang's Driver code into LLVM's Option library

This is in preparation for switching the clang driver over to using LLVM's
Option library.  Richard Smith introduced most of these changes to the clang
driver in r167638.

Reviewers: espindola on IRC

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

llvm-svn: 183925

11 years agoClean up test to appease NDEBUG builds.
Richard Smith [Thu, 13 Jun 2013 18:07:12 +0000 (18:07 +0000)]
Clean up test to appease NDEBUG builds.

llvm-svn: 183924

11 years agoAdded some new example code that can grab all functions from any executable, and...
Greg Clayton [Thu, 13 Jun 2013 18:03:11 +0000 (18:03 +0000)]
Added some new example code that can grab all functions from any executable, and it will print out the function name, range, return type and argument types.

This example shows someone could iterate over all functions and do something intelligent with them, like create function signatures. Then two different builds could be compared to verify the API hasn't changed.

llvm-svn: 183923

11 years agoInheritViz.cpp uses sys::Path, include PathV1.h
Rafael Espindola [Thu, 13 Jun 2013 17:35:20 +0000 (17:35 +0000)]
InheritViz.cpp uses sys::Path, include PathV1.h

llvm-svn: 183922

11 years agoCovert remaining graph viewers from sys::Path to std::string.
Rafael Espindola [Thu, 13 Jun 2013 17:32:16 +0000 (17:32 +0000)]
Covert remaining graph viewers from sys::Path to std::string.

llvm-svn: 183921

11 years agoUpdate code for other graph viewing programs too.
Rafael Espindola [Thu, 13 Jun 2013 17:27:45 +0000 (17:27 +0000)]
Update code for other graph viewing programs too.

llvm-svn: 183920

11 years agoReduce usage of sys::Path in the graph writer.
Rafael Espindola [Thu, 13 Jun 2013 17:20:48 +0000 (17:20 +0000)]
Reduce usage of sys::Path in the graph writer.

Now PathV1.h is not needed in GraphWriter.h.

llvm-svn: 183919

11 years agocpp11-migrate: const-correcting IncludeExcludeInfo
Edwin Vane [Thu, 13 Jun 2013 17:19:37 +0000 (17:19 +0000)]
cpp11-migrate: const-correcting IncludeExcludeInfo

isFileIncluded() needed to be marked const.

llvm-svn: 183918

11 years agocpp11-migrate: Add headers to file override information
Edwin Vane [Thu, 13 Jun 2013 17:17:32 +0000 (17:17 +0000)]
cpp11-migrate: Add headers to file override information

File override structures now contain per-source overrides for headers.

For now, modified headers are written to disk when the Migrator is done.
This is only temporary behaviour since we can expect headers to be
changed by migrating multiple source files. The changes need to be
merged after all migrations are complete.

llvm-svn: 183917

11 years agoUse version of DisplayGraph that takes a StringRef.
Rafael Espindola [Thu, 13 Jun 2013 16:57:07 +0000 (16:57 +0000)]
Use version of DisplayGraph that takes a StringRef.

llvm-svn: 183916

11 years agoAdd a version of DisplayGraph that takes a StringRef.
Rafael Espindola [Thu, 13 Jun 2013 16:56:13 +0000 (16:56 +0000)]
Add a version of DisplayGraph that takes a StringRef.

llvm-svn: 183915

11 years agoARM: fix B decoding
Amaury de la Vieuville [Thu, 13 Jun 2013 16:41:55 +0000 (16:41 +0000)]
ARM: fix B decoding

llvm-svn: 183914

11 years agoARM: fix t2am_imm8_offset operand printing for imm=#-0
Amaury de la Vieuville [Thu, 13 Jun 2013 16:40:51 +0000 (16:40 +0000)]
ARM: fix t2am_imm8_offset operand printing for imm=#-0

llvm-svn: 183913

11 years agoFurther reduce usage of sys::Path in bugpoint.
Rafael Espindola [Thu, 13 Jun 2013 16:22:26 +0000 (16:22 +0000)]
Further reduce usage of sys::Path in bugpoint.

llvm-svn: 183912

11 years agoRemove the windows CR
Sylvestre Ledru [Thu, 13 Jun 2013 16:05:41 +0000 (16:05 +0000)]
Remove the windows CR

llvm-svn: 183911

11 years agocpp11-migrate: Replace file override container
Edwin Vane [Thu, 13 Jun 2013 16:00:46 +0000 (16:00 +0000)]
cpp11-migrate: Replace file override container

A more flexible container for storing overrides is required for headers. Before
a source goes through the transform pipeline, any headers it references will be
in their original state and unaffected by transforms applied to other sources.
Therefore overrides for headers need to be kept separate for each source file.

This patch doesn't introduce support for storing header overrides yet. It only
replaces the existing structure and makes any necessary changes to support it.

llvm-svn: 183910

11 years agoTry to fix the build with libstdc++ 4.4.
Rafael Espindola [Thu, 13 Jun 2013 15:52:54 +0000 (15:52 +0000)]
Try to fix the build with libstdc++ 4.4.

llvm-svn: 183909

11 years agoReduce sys::Path usage in bugpoint.
Rafael Espindola [Thu, 13 Jun 2013 15:47:11 +0000 (15:47 +0000)]
Reduce sys::Path usage in bugpoint.

llvm-svn: 183908

11 years agoX86: Make the cmov aliases work with intel syntax too.
Benjamin Kramer [Thu, 13 Jun 2013 15:45:24 +0000 (15:45 +0000)]
X86: Make the cmov aliases work with intel syntax too.

llvm-svn: 183907

11 years ago[Support] Fix handle and memory leak for processes that are not waited for
Reid Kleckner [Thu, 13 Jun 2013 15:27:17 +0000 (15:27 +0000)]
[Support] Fix handle and memory leak for processes that are not waited for

Execute's Data parameter is now optional, so we won't allocate memory
for it on Windows and we'll close the process handle.

The Unix code should probably do something similar to avoid accumulation
of zombie children that haven't been waited on.

Tested on Linux and Windows.

llvm-svn: 183906

11 years agoTeach clang about the armv4/armv4t distinction
Tim Northover [Thu, 13 Jun 2013 15:02:46 +0000 (15:02 +0000)]
Teach clang about the armv4/armv4t distinction

When choosing a default CPU, clang used to pick ARM7TDMI (which has Thumb) even
when the more restrictive armv4 triple was specified. This should fix that.

Patch by Jeroen Hofstee.

llvm-svn: 183905

11 years agoZero-initializing variables; fixes a build breakage introduced in r183864.
Aaron Ballman [Thu, 13 Jun 2013 14:39:07 +0000 (14:39 +0000)]
Zero-initializing variables; fixes a build breakage introduced in r183864.

llvm-svn: 183904

11 years agoModernize some low-hanging PathV1 uses.
Benjamin Kramer [Thu, 13 Jun 2013 14:26:04 +0000 (14:26 +0000)]
Modernize some low-hanging PathV1 uses.

llvm-svn: 183903

11 years agolibclang: Remove clang::RemapFiles, it's dead code.
Benjamin Kramer [Thu, 13 Jun 2013 13:57:48 +0000 (13:57 +0000)]
libclang: Remove clang::RemapFiles, it's dead code.

llvm-svn: 183902

11 years agolibclang: Port CIndexer::getClangResourcesPath to PathV2. No functionality change.
Benjamin Kramer [Thu, 13 Jun 2013 13:56:37 +0000 (13:56 +0000)]
libclang: Port CIndexer::getClangResourcesPath to PathV2. No functionality change.

llvm-svn: 183901

11 years agoAdd Ubuntu Saucy to the list of known Ubuntu releases
Sylvestre Ledru [Thu, 13 Jun 2013 11:52:27 +0000 (11:52 +0000)]
Add Ubuntu Saucy to the list of known Ubuntu releases
Thanks to Dmitry Shachnev for the patch
See bug #16317

llvm-svn: 183899

11 years agotsan: fix Windows Go crash
Dmitry Vyukov [Thu, 13 Jun 2013 10:15:44 +0000 (10:15 +0000)]
tsan: fix Windows Go crash

llvm-svn: 183898

11 years agoDo not create an object to call a static function
Tobias Grosser [Thu, 13 Jun 2013 09:10:23 +0000 (09:10 +0000)]
Do not create an object to call a static function

llvm-svn: 183897

11 years agoMake it clear in Decl::hasBody that it can return true on redeclarations.
Manuel Klimek [Thu, 13 Jun 2013 09:05:19 +0000 (09:05 +0000)]
Make it clear in Decl::hasBody that it can return true on redeclarations.

llvm-svn: 183896

11 years ago[LSan] fix link flags for building unit tests
Alexey Samsonov [Thu, 13 Jun 2013 07:23:18 +0000 (07:23 +0000)]
[LSan] fix link flags for building unit tests

llvm-svn: 183891

11 years agoMore for PR12457: fix handling of __builtin_isinf_sign and test.
Richard Smith [Thu, 13 Jun 2013 06:31:13 +0000 (06:31 +0000)]
More for PR12457: fix handling of __builtin_isinf_sign and test.

llvm-svn: 183890

11 years agoTowards PR12457: constant expression evaluation support for __builtin_parity{,l,ll...
Richard Smith [Thu, 13 Jun 2013 06:26:32 +0000 (06:26 +0000)]
Towards PR12457: constant expression evaluation support for __builtin_parity{,l,ll}, __builtin_ffs{,l,ll}, and __builtin_fpclassify.

llvm-svn: 183889

11 years agoUpdated C++1y status for contextual conversions to 'partial' (without review)
Larisse Voufo [Thu, 13 Jun 2013 06:04:33 +0000 (06:04 +0000)]
Updated C++1y status for contextual conversions to 'partial' (without review)

llvm-svn: 183888

11 years ago[PECOFF] Make readSymbolTable a const function.
Rui Ueyama [Thu, 13 Jun 2013 05:23:47 +0000 (05:23 +0000)]
[PECOFF] Make readSymbolTable a const function.

llvm-svn: 183887

11 years agoFix part of PR12457. Patch by Justin Bogner!
Richard Smith [Thu, 13 Jun 2013 05:04:16 +0000 (05:04 +0000)]
Fix part of PR12457. Patch by Justin Bogner!

llvm-svn: 183886

11 years agoFix some confusing diagnostic wording. s/implicit default/implicit/ if we're
Richard Smith [Thu, 13 Jun 2013 03:34:55 +0000 (03:34 +0000)]
Fix some confusing diagnostic wording. s/implicit default/implicit/ if we're
not actually talking about a default constructor.

llvm-svn: 183885

11 years agoC++11: If a class has a user-declared copy operation or destructor, the
Richard Smith [Thu, 13 Jun 2013 03:23:42 +0000 (03:23 +0000)]
C++11: If a class has a user-declared copy operation or destructor, the
implicit definition of a copy operation is deprecated. Add a warning for this
to -Wdeprecated. This warning is disabled by default for now, pending
investigation into how common this situation is.

llvm-svn: 183884

11 years agoImplement core issue 903: only integer literals with value 0 and prvalues of
Richard Smith [Thu, 13 Jun 2013 02:46:14 +0000 (02:46 +0000)]
Implement core issue 903: only integer literals with value 0 and prvalues of
type std::nullptr_t are null pointer constants from C++11 onwards.

llvm-svn: 183883

11 years agoIn C++11, promote access declaration diagnostic from warning to error. There
Richard Smith [Thu, 13 Jun 2013 02:12:17 +0000 (02:12 +0000)]
In C++11, promote access declaration diagnostic from warning to error. There
doesn't seem to be any value in even adding a -W flag for this.

llvm-svn: 183882

11 years agoAdd -Wdeprecated warnings and fixits for things deprecated in C++11:
Richard Smith [Thu, 13 Jun 2013 02:02:51 +0000 (02:02 +0000)]
Add -Wdeprecated warnings and fixits for things deprecated in C++11:
 - 'register' storage class
 - dynamic exception specifications

Only the former check is enabled by default for now (the latter might be quite noisy).

llvm-svn: 183881

11 years agoWhen copy-initializing a temporary for a reference binding, don't allow use of
Richard Smith [Thu, 13 Jun 2013 00:57:57 +0000 (00:57 +0000)]
When copy-initializing a temporary for a reference binding, don't allow use of
explicit constructors.

llvm-svn: 183879

11 years agoInclude the unexpanded packs in the initializer expression when checking a
Nick Lewycky [Thu, 13 Jun 2013 00:45:47 +0000 (00:45 +0000)]
Include the unexpanded packs in the initializer expression when checking a
pack expanded constructor initializer list. Fixes PR16303!

llvm-svn: 183878

11 years ago[ARM] Remove isThumb() as it's not used and it's not in the right place.
Rui Ueyama [Thu, 13 Jun 2013 00:26:16 +0000 (00:26 +0000)]
[ARM] Remove isThumb() as it's not used and it's not in the right place.

Architecture specific code should reside in architecture specific directory
not in Atom. Looks like there are no efforts being made at this moment to
support ARM, so let's remove it for now.

Reviewers: Bigcheese

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

llvm-svn: 183877

11 years ago[PECOFF] Define constants for page size and disk sector size.
Rui Ueyama [Wed, 12 Jun 2013 23:45:32 +0000 (23:45 +0000)]
[PECOFF] Define constants for page size and disk sector size.

llvm-svn: 183876

11 years agoSimplify: we don't need any special-case lifetime extension when initializing
Richard Smith [Wed, 12 Jun 2013 23:38:09 +0000 (23:38 +0000)]
Simplify: we don't need any special-case lifetime extension when initializing
declarations of reference type; they're handled by the general case handling of
MaterializeTemporaryExpr.

llvm-svn: 183875

11 years agoDon't suggest putting 'operator new' or 'operator delete' in a namespace to fix a...
Richard Smith [Wed, 12 Jun 2013 22:56:54 +0000 (22:56 +0000)]
Don't suggest putting 'operator new' or 'operator delete' in a namespace to fix a two-phase lookup issue. That's not permitted.

llvm-svn: 183874

11 years agoFix broken header guard.
Richard Trieu [Wed, 12 Jun 2013 22:37:22 +0000 (22:37 +0000)]
Fix broken header guard.

llvm-svn: 183873

11 years agoPR12086, PR15117
Richard Smith [Wed, 12 Jun 2013 22:31:48 +0000 (22:31 +0000)]
PR12086, PR15117

Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).

This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.

llvm-svn: 183872

11 years agoPrint ConstantPool entries initialized to Values with WriteAsOperand instead of
Dan Gohman [Wed, 12 Jun 2013 22:19:19 +0000 (22:19 +0000)]
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

11 years ago[PECOFF] Rename basic.test -> trivial.test.
Rui Ueyama [Wed, 12 Jun 2013 22:19:05 +0000 (22:19 +0000)]
[PECOFF] Rename basic.test -> trivial.test.

Because the test does not actually cover basic features.

llvm-svn: 183870

11 years agoMove detection of reference members binding to temporaries from building of
Richard Smith [Wed, 12 Jun 2013 21:51:50 +0000 (21:51 +0000)]
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

11 years ago[Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.
Rafael Espindola [Wed, 12 Jun 2013 21:25:04 +0000 (21:25 +0000)]
[Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.

llvm-svn: 183868

11 years agoIntroducing -Wheader-guard, a warning that checks header guards actually work
Richard Trieu [Wed, 12 Jun 2013 21:20:57 +0000 (21:20 +0000)]
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

11 years agos/Void/void.
Rafael Espindola [Wed, 12 Jun 2013 21:16:07 +0000 (21:16 +0000)]
s/Void/void.

llvm-svn: 183866

11 years agoAttempt at fixing the windows build.
Rafael Espindola [Wed, 12 Jun 2013 21:11:50 +0000 (21:11 +0000)]
Attempt at fixing the windows build.

llvm-svn: 183865

11 years agoRemove the program class.
Rafael Espindola [Wed, 12 Jun 2013 20:58:35 +0000 (20:58 +0000)]
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

11 years agoRevert r183854 (PPC: Fix switch warnings from r183841)
David Blaikie [Wed, 12 Jun 2013 20:57:32 +0000 (20:57 +0000)]
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

11 years agoUse the global functions instead of the Program methods.
Rafael Espindola [Wed, 12 Jun 2013 20:47:14 +0000 (20:47 +0000)]
Use the global functions instead of the Program methods.

llvm-svn: 183862

11 years agoUse the global functions instead of the Program methods.
Rafael Espindola [Wed, 12 Jun 2013 20:44:26 +0000 (20:44 +0000)]
Use the global functions instead of the Program methods.

llvm-svn: 183861

11 years agoAdd global versions of some Program static methods.
Rafael Espindola [Wed, 12 Jun 2013 20:42:59 +0000 (20:42 +0000)]
Add global versions of some Program static methods.

This is a temporary stepping stone for moving them out of Program.

llvm-svn: 183860

11 years agoReapply r183721, reverted in r183776, with a fix for a bug in the former (we
Richard Smith [Wed, 12 Jun 2013 20:42:33 +0000 (20:42 +0000)]
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

11 years ago[PowerPC] Remove PRED_BAD from PPC::Predicate enumeration.
Bill Schmidt [Wed, 12 Jun 2013 20:22:24 +0000 (20:22 +0000)]
[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

11 years agoRetain linker flags specified on cmake command line.
Andy Gibbs [Wed, 12 Jun 2013 20:02:59 +0000 (20:02 +0000)]
Retain linker flags specified on cmake command line.

llvm-svn: 183857

11 years agocpp11-migrate: Decluttering Transform.h
Edwin Vane [Wed, 12 Jun 2013 19:58:21 +0000 (19:58 +0000)]
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

11 years agocpp11-migrate: New mechanism for overriding file contents
Edwin Vane [Wed, 12 Jun 2013 19:52:13 +0000 (19:52 +0000)]
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

11 years ago[PowerPC] Fix switch warnings from r183841.
Bill Schmidt [Wed, 12 Jun 2013 19:20:32 +0000 (19:20 +0000)]
[PowerPC] Fix switch warnings from r183841.

Introducing PRED_BAD caused some unexpected warnings that are now
suppressed.

llvm-svn: 183854

11 years ago[PECOFF] Test for r183705.
Rui Ueyama [Wed, 12 Jun 2013 19:13:27 +0000 (19:13 +0000)]
[PECOFF] Test for r183705.

llvm-svn: 183853

11 years agoreadobj: Dump PE/COFF optional records.
Rui Ueyama [Wed, 12 Jun 2013 19:10:33 +0000 (19:10 +0000)]
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

11 years agoPreserve newlines before block comments in static initializers.
Alexander Kornienko [Wed, 12 Jun 2013 19:04:12 +0000 (19:04 +0000)]
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

11 years ago[ELF] Remove unused parameter from ELFReference c'tor.
Rui Ueyama [Wed, 12 Jun 2013 18:21:36 +0000 (18:21 +0000)]
[ELF] Remove unused parameter from ELFReference c'tor.

Reviewers: shankarke

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

llvm-svn: 183850

11 years agoPort HTMLDiagnostics to PathV2. No intended functionality change.
Benjamin Kramer [Wed, 12 Jun 2013 18:13:05 +0000 (18:13 +0000)]
Port HTMLDiagnostics to PathV2. No intended functionality change.

llvm-svn: 183849

11 years agoFix buildbot breakage on PPC64.
Eli Friedman [Wed, 12 Jun 2013 17:31:32 +0000 (17:31 +0000)]
Fix buildbot breakage on PPC64.

llvm-svn: 183847

11 years agoIf using clang 3.4, skip tests affected by llvm.org/pr16214
Daniel Malea [Wed, 12 Jun 2013 16:48:33 +0000 (16:48 +0000)]
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

11 years agoAlways remove an alias when we rename the target.
Rafael Espindola [Wed, 12 Jun 2013 16:45:47 +0000 (16:45 +0000)]
Always remove an alias when we rename the target.

Should fix the dragonegg build bots.

llvm-svn: 183845

11 years ago[PowerPC] Expose some calling convention functions in PPCISelLowering.h.
Bill Schmidt [Wed, 12 Jun 2013 16:39:22 +0000 (16:39 +0000)]
[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

11 years agoConvert test to FileCheck.
Rafael Espindola [Wed, 12 Jun 2013 16:35:53 +0000 (16:35 +0000)]
Convert test to FileCheck.

llvm-svn: 183843

11 years agoDon't use PathV1 in CommandLine.cpp.
Rafael Espindola [Wed, 12 Jun 2013 15:37:27 +0000 (15:37 +0000)]
Don't use PathV1 in CommandLine.cpp.

No functionality change.

llvm-svn: 183842

11 years agoAdd artificial PRED_BAD to PPC::Predicate enumeration.
Bill Schmidt [Wed, 12 Jun 2013 15:14:42 +0000 (15:14 +0000)]
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

11 years agoInline Path::isBitcodeFile into only use and remove it.
Rafael Espindola [Wed, 12 Jun 2013 15:13:57 +0000 (15:13 +0000)]
Inline Path::isBitcodeFile into only use and remove it.

llvm-svn: 183840

11 years agoRemove Path::getMagicNumber.
Rafael Espindola [Wed, 12 Jun 2013 15:07:11 +0000 (15:07 +0000)]
Remove Path::getMagicNumber.

llvm-svn: 183839

11 years agoRemove Path::hasMagicNumber.
Rafael Espindola [Wed, 12 Jun 2013 15:04:59 +0000 (15:04 +0000)]
Remove Path::hasMagicNumber.

llvm-svn: 183838

11 years agoSilencing a signed vs unsigned comparison mismatch in MSVC.
Aaron Ballman [Wed, 12 Jun 2013 15:03:45 +0000 (15:03 +0000)]
Silencing a signed vs unsigned comparison mismatch in MSVC.

llvm-svn: 183837

11 years agoRemove Path::isAbsolute.
Rafael Espindola [Wed, 12 Jun 2013 15:02:39 +0000 (15:02 +0000)]
Remove Path::isAbsolute.

llvm-svn: 183836

11 years agoRemove Path::isAbsolute().
Rafael Espindola [Wed, 12 Jun 2013 14:47:33 +0000 (14:47 +0000)]
Remove Path::isAbsolute().

llvm-svn: 183835

11 years ago[MC/DWARF] Support .debug_frame / .debug_line code alignment factors
Ulrich Weigand [Wed, 12 Jun 2013 14:46:54 +0000 (14:46 +0000)]
[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

11 years agoRemove Path::getSuffix.
Rafael Espindola [Wed, 12 Jun 2013 14:32:51 +0000 (14:32 +0000)]
Remove Path::getSuffix.

llvm-svn: 183833

11 years agoLLDB feature status update to mention limitations with core-file debugging and exec.
Ashok Thirumurthi [Wed, 12 Jun 2013 14:26:58 +0000 (14:26 +0000)]
LLDB feature status update to mention limitations with core-file debugging and exec.

llvm-svn: 183832

11 years agoRemove sys::CopyFile.
Rafael Espindola [Wed, 12 Jun 2013 14:16:52 +0000 (14:16 +0000)]
Remove sys::CopyFile.

llvm-svn: 183831

11 years agoFix 'gcc -flto' builds for unittest binaries (undefined reference to
Patrik Hagglund [Wed, 12 Jun 2013 14:15:21 +0000 (14:15 +0000)]
Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm::cl::GenericOptionValue').

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

llvm-svn: 183830

11 years ago[PowerPC] Use assembler source in MC tests
Ulrich Weigand [Wed, 12 Jun 2013 14:14:18 +0000 (14:14 +0000)]
[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