platform/upstream/llvm.git
11 years agoRemove empty directory.
Rafael Espindola [Fri, 14 Jun 2013 23:27:04 +0000 (23:27 +0000)]
Remove empty directory.

llvm-svn: 184020

11 years agoRemove the LLVM specific archive index.
Rafael Espindola [Fri, 14 Jun 2013 23:25:53 +0000 (23:25 +0000)]
Remove the LLVM specific archive index.

Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.

LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:

* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.

* It doesn't interact well with archives having both IL and native objects.

* We probably don't want to be responsible for yet another archive
format variant.

This patch then:

* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.

We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".

llvm-svn: 184019

11 years agoFix autohell build.
Rafael Espindola [Fri, 14 Jun 2013 23:00:27 +0000 (23:00 +0000)]
Fix autohell build.

llvm-svn: 184018

11 years agoFix handling of const_cast from prvalue to rvalue reference: such a cast is
Richard Smith [Fri, 14 Jun 2013 22:27:52 +0000 (22:27 +0000)]
Fix handling of const_cast from prvalue to rvalue reference: such a cast is
only permitted if the source object is of class type, and should materialize a
temporary for the reference to bind to.

llvm-svn: 184017

11 years agoR600: Use correct encoding for Vertex Fetch instructions on Cayman
Tom Stellard [Fri, 14 Jun 2013 22:12:30 +0000 (22:12 +0000)]
R600: Use correct encoding for Vertex Fetch instructions on Cayman

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 184016

11 years agoR600: Use EXPORT_RAT_INST_STORE_DWORD for stores on Cayman
Tom Stellard [Fri, 14 Jun 2013 22:12:24 +0000 (22:12 +0000)]
R600: Use EXPORT_RAT_INST_STORE_DWORD for stores on Cayman

We were using RAT_INST_STORE_RAW, which seemed to work, but the docs
say this instruction doesn't exist for Cayman, so it's probably safer
to use a documented instruction instead.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 184015

11 years agoR600: Factor the instruction encoding out the RAT_WRITE_CACHELESS_eg class
Tom Stellard [Fri, 14 Jun 2013 22:12:19 +0000 (22:12 +0000)]
R600: Factor the instruction encoding out the RAT_WRITE_CACHELESS_eg class

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 184014

11 years agoR600: Move instruction encoding definitions into a separate .td file
Tom Stellard [Fri, 14 Jun 2013 22:12:09 +0000 (22:12 +0000)]
R600: Move instruction encoding definitions into a separate .td file

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 184013

11 years agoIntroduce getSelect usage and use more getSelectCC
Matt Arsenault [Fri, 14 Jun 2013 22:04:37 +0000 (22:04 +0000)]
Introduce getSelect usage and use more getSelectCC

llvm-svn: 184012

11 years agoAdd getSelect helper function
Matt Arsenault [Fri, 14 Jun 2013 22:04:32 +0000 (22:04 +0000)]
Add getSelect helper function

Patch by Micah Villmow from last year that was reviewed, but never committed

llvm-svn: 184011

11 years agoRevert "sys::Path::GetCurrentDirectory has been removed. Use sys::fs::current_path."
Rafael Espindola [Fri, 14 Jun 2013 21:44:06 +0000 (21:44 +0000)]
Revert "sys::Path::GetCurrentDirectory has been removed. Use sys::fs::current_path."

This reverts commit r184004.

This test has some dependency on the behavior of the old function on windows. I
added it back to llvm for now.

llvm-svn: 184010

11 years agoAdd GetCurrentDirectory back.
Rafael Espindola [Fri, 14 Jun 2013 21:41:33 +0000 (21:41 +0000)]
Add GetCurrentDirectory back.

It looks like clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
depends on the behaviour of the old one on Windows. Maybe a difference
between GetCurrentDirectoryA and GetCurrentDirectoryW?

llvm-svn: 184009

11 years agoSelectionDAG: minor fix to order of operands in comments to match the code
Stephen Lin [Fri, 14 Jun 2013 21:33:58 +0000 (21:33 +0000)]
SelectionDAG: minor fix to order of operands in comments to match the code

llvm-svn: 184008

11 years agoFix comments referring to non-existent types.
Eli Friedman [Fri, 14 Jun 2013 21:28:56 +0000 (21:28 +0000)]
Fix comments referring to non-existent types.

llvm-svn: 184007

11 years agoUnify return type checking for functions and ObjC methods. Move all the
Eli Friedman [Fri, 14 Jun 2013 21:14:10 +0000 (21:14 +0000)]
Unify return type checking for functions and ObjC methods.  Move all the
random checks for ObjC object return types to SemaType.cpp.

Fixes issue with ObjC method type checking reported on cfe-dev.

llvm-svn: 184006

11 years agoSuppress the c++11 -Wdeprecated warning for 'register' if it is expanded from a
Richard Smith [Fri, 14 Jun 2013 21:05:24 +0000 (21:05 +0000)]
Suppress the c++11 -Wdeprecated warning for 'register' if it is expanded from a
macro defined in a system header. glibc uses it in macros, apparently.

llvm-svn: 184005

11 years agosys::Path::GetCurrentDirectory has been removed. Use sys::fs::current_path.
Rafael Espindola [Fri, 14 Jun 2013 20:48:30 +0000 (20:48 +0000)]
sys::Path::GetCurrentDirectory has been removed. Use sys::fs::current_path.

llvm-svn: 184004

11 years agoReplace use of PathV1.h in MCContext.cpp.
Rafael Espindola [Fri, 14 Jun 2013 20:26:58 +0000 (20:26 +0000)]
Replace use of PathV1.h in MCContext.cpp.

GetCurrentDirectory is now unused. Remove it.

llvm-svn: 184003

11 years agoMark rematerialized super/sub registers as dead.
Tim Northover [Fri, 14 Jun 2013 20:22:21 +0000 (20:22 +0000)]
Mark rematerialized super/sub registers as dead.

When we're rematerializing into a not-quite-right register we already add the
real definition as an imp-def, but we should also be marking the "official"
register as dead, since nothing else is going to use it as a result of this
remat.

Not doing this can affect pressure tracking.

rdar://problem/14158833

llvm-svn: 184002

11 years agoscop detection: inline and remove isValidBasicBlock
Sebastian Pop [Fri, 14 Jun 2013 20:20:43 +0000 (20:20 +0000)]
scop detection: inline and remove isValidBasicBlock

llvm-svn: 184001

11 years agoscop detection: check flag before expensive call
Sebastian Pop [Fri, 14 Jun 2013 20:20:39 +0000 (20:20 +0000)]
scop detection: check flag before expensive call

llvm-svn: 184000

11 years agoFix frame pointer debug information test
JF Bastien [Fri, 14 Jun 2013 19:55:26 +0000 (19:55 +0000)]
Fix frame pointer debug information test

Run the test at O1 instead of O0: ARM FastISel keeps frame pointers around and ignores the flag. The test should now pass on ARM and still passes on x86.See: http://llvm.org/bugs/show_bug.cgi?id=16322

llvm-svn: 183999

11 years agoRemove unused Host macro.
Matt Kopec [Fri, 14 Jun 2013 19:41:36 +0000 (19:41 +0000)]
Remove unused Host macro.

Patch from Ed Maste.

llvm-svn: 183998

11 years agoRevert "Cmake: add compiler option in a more idiomatic way"
Rafael Espindola [Fri, 14 Jun 2013 19:41:05 +0000 (19:41 +0000)]
Revert "Cmake: add compiler option in a more idiomatic way"

This reverts commit 183995.

It broke the bots:
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/9730/steps/build_clang/logs/stdio

llvm-svn: 183997

11 years agoReplace use of PathV1.h in Program.cpp.
Rafael Espindola [Fri, 14 Jun 2013 19:38:45 +0000 (19:38 +0000)]
Replace use of PathV1.h in Program.cpp.

llvm-svn: 183996

11 years agoCmake: add compiler option in a more idiomatic way
Arnaud A. de Grandmaison [Fri, 14 Jun 2013 19:26:57 +0000 (19:26 +0000)]
Cmake: add compiler option in a more idiomatic way

llvm-svn: 183995

11 years agoDo not to perform RUN line substitution of llc if that's prefixed by a hypnen
Eli Bendersky [Fri, 14 Jun 2013 19:14:52 +0000 (19:14 +0000)]
Do not to perform RUN line substitution of llc if that's prefixed by a hypnen
(-llc), similarly to the way it was done for clang and llvmc.

This doesn't affect the upstream llvm tests but helps when developing custom
LLVM-based tools and testing them within the LLVM regression framework.

llvm-svn: 183994

11 years agoSelectionDAG: Fix incorrect condition checks in some cases of folding FADD/FMUL combi...
Stephen Lin [Fri, 14 Jun 2013 18:17:35 +0000 (18:17 +0000)]
SelectionDAG: Fix incorrect condition checks in some cases of folding FADD/FMUL combinations; also improve accuracy of comments

llvm-svn: 183993

11 years agoRemove unused argument.
Rafael Espindola [Fri, 14 Jun 2013 18:12:13 +0000 (18:12 +0000)]
Remove unused argument.

llvm-svn: 183992

11 years agoFix the build. clang/Driver/OptTable.h was removed.
Rafael Espindola [Fri, 14 Jun 2013 18:04:50 +0000 (18:04 +0000)]
Fix the build. clang/Driver/OptTable.h was removed.

llvm-svn: 183991

11 years agoAdd a dependency on LLVM's option library for clang-tools-extra
Reid Kleckner [Fri, 14 Jun 2013 17:34:04 +0000 (17:34 +0000)]
Add a dependency on LLVM's option library for clang-tools-extra

r183989 added a dependency on LLVMOption in clangFrontend.

llvm-svn: 183990

11 years ago[Driver] Refactor clang driver to use LLVM's Option library
Reid Kleckner [Fri, 14 Jun 2013 17:17:23 +0000 (17:17 +0000)]
[Driver] Refactor clang driver to use LLVM's Option library

The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere

As discussed in the review, this change includes using directives in
header files.  I'll make follow up changes to remove those in favor of
name specifiers.

Reviewers: espindola

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

llvm-svn: 183989

11 years agoDon't use PathV1.h in GraphWriter.cpp.
Rafael Espindola [Fri, 14 Jun 2013 17:11:14 +0000 (17:11 +0000)]
Don't use PathV1.h in GraphWriter.cpp.

llvm-svn: 183988

11 years agoConvert a use of sys::Path::GetTemporaryDirectory.
Rafael Espindola [Fri, 14 Jun 2013 16:43:15 +0000 (16:43 +0000)]
Convert a use of sys::Path::GetTemporaryDirectory.

llvm-svn: 183987

11 years agoCorrectly convert APInt to gmp values
Tobias Grosser [Fri, 14 Jun 2013 16:23:38 +0000 (16:23 +0000)]
Correctly convert APInt to gmp values

Previously this happend to work for integers up to i64, but we got it wrong
for larger numbers. Fix this and add test cases to verify this keeps working.

Reported by: Sven Verdoolaege <skimo at kotnet dot org>

llvm-svn: 183986

11 years agoRemove a use of PathV1.h.
Rafael Espindola [Fri, 14 Jun 2013 16:20:18 +0000 (16:20 +0000)]
Remove a use of PathV1.h.

llvm-svn: 183985

11 years agoMake PrologEpilogInserter save/restore all callee saved registers
Derek Schuff [Fri, 14 Jun 2013 16:15:29 +0000 (16:15 +0000)]
Make PrologEpilogInserter save/restore all callee saved registers
in functions which call __builtin_unwind_init()

__builtin_unwind_init() is an undocumented gcc intrinsic which has this effect,
and is used in libgcc_eh.

Goes part of the way toward fixing PR8541.

llvm-svn: 183984

11 years agoForce c++98 so this works on windows where c++11 is the default.
Rafael Espindola [Fri, 14 Jun 2013 16:09:37 +0000 (16:09 +0000)]
Force c++98 so this works on windows where c++11 is the default.

llvm-svn: 183983

11 years agoRemove a use of PathV1.h.
Rafael Espindola [Fri, 14 Jun 2013 15:24:56 +0000 (15:24 +0000)]
Remove a use of PathV1.h.

llvm-svn: 183982

11 years agocpp11-migrate: Fixing section markup
Edwin Vane [Fri, 14 Jun 2013 15:14:20 +0000 (15:14 +0000)]
cpp11-migrate: Fixing section markup

Adhering to LLVM's ReST style for section markup.

llvm-svn: 183981

11 years agoMove PrependMainExecutablePath next to its only user.
Rafael Espindola [Fri, 14 Jun 2013 15:12:13 +0000 (15:12 +0000)]
Move PrependMainExecutablePath next to its only user.

llvm-svn: 183980

11 years agoRemove a use of sys::Path.
Rafael Espindola [Fri, 14 Jun 2013 13:59:21 +0000 (13:59 +0000)]
Remove a use of sys::Path.

llvm-svn: 183979

11 years agoDon't remove backslashes from block comments.
Alexander Kornienko [Fri, 14 Jun 2013 11:46:10 +0000 (11:46 +0000)]
Don't remove backslashes from block comments.

Summary:
Don't remove backslashes from block comments. Previously this
/* \    \ \ \ \ \
*/
would be turned to this:
/*
*/
which spoils some kinds of ASCII-art, people use in their comments. The behavior
was related to handling escaped newlines in block comments inside preprocessor
directives. This patch makes handling it in a more civilized way.

Reviewers: klimek

Reviewed By: klimek

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

llvm-svn: 183978

11 years agoProperly install LSan interface header, rely on sanitizer header presence in lit...
Alexey Samsonov [Fri, 14 Jun 2013 11:45:36 +0000 (11:45 +0000)]
Properly install LSan interface header, rely on sanitizer header presence in lit tests

llvm-svn: 183977

11 years agoAlso install cpp11-migrate when built with cmake. Fixes bug #16296
Sylvestre Ledru [Fri, 14 Jun 2013 11:25:50 +0000 (11:25 +0000)]
Also install cpp11-migrate when built with cmake. Fixes bug #16296

llvm-svn: 183976

11 years agoARM: fix thumb coprocessor instruction with pre-writeback disassembly
Amaury de la Vieuville [Fri, 14 Jun 2013 11:21:35 +0000 (11:21 +0000)]
ARM: fix thumb coprocessor instruction with pre-writeback disassembly

was        stc2 p0, c0, [r0]!
instead of stc2 p0, c0, [r0,#0]!

llvm-svn: 183975

11 years ago[TSan] use InternalMmapVector to store fired suppressions
Alexey Samsonov [Fri, 14 Jun 2013 11:18:58 +0000 (11:18 +0000)]
[TSan] use InternalMmapVector to store fired suppressions

llvm-svn: 183974

11 years ago[LSan] Use a typedef for frontier vector
Alexey Samsonov [Fri, 14 Jun 2013 10:07:56 +0000 (10:07 +0000)]
[LSan] Use a typedef for frontier vector

llvm-svn: 183973

11 years ago[Sanitizer] Rename InternalVector to InternalMmapVector
Alexey Samsonov [Fri, 14 Jun 2013 09:59:40 +0000 (09:59 +0000)]
[Sanitizer] Rename InternalVector to InternalMmapVector

llvm-svn: 183972

11 years agoX86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent.
Benjamin Kramer [Fri, 14 Jun 2013 09:31:41 +0000 (09:31 +0000)]
X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent.

Give it the right register format so we can also emit it when AVX is enabled.

llvm-svn: 183971

11 years agoFix the warning for divide by zero to be a bit more robust. ;]
Chandler Carruth [Fri, 14 Jun 2013 08:57:18 +0000 (08:57 +0000)]
Fix the warning for divide by zero to be a bit more robust. ;]

Previously, it only ever fired for zeros which formed null pointers.
Now, hilariously, in C++98 this was almost anything. Including tricks
like warning on the divisor in this code:

typedef char c3[3];
size_t f(c3* ptr) {
  return (sizeof(ptr) / sizeof(*ptr)) / (size_t)(!(sizeof(ptr) % sizeof(*ptr)));
}

Why the RHS of the outer divide is a null pointer constant is a sordid
tale of sorrow. Anyways, the committee fixed this for C++11 and onward
as part of core isssue 903, and Richard recently implemented this fix
causing the warning to go away here (and elsewhere).

This patch restores the warning here and adds it for numerous other
somewhat obvious gaffes:

int g(int x) {
  return x / (int)(0.0);
}

The patch is essentially just using the full power of our constant
folding in Clang to produce the warning, but insisting that it must fold
to an *integer* which is zero so that we don't get false positives
anywhere.

llvm-svn: 183970

11 years agoPoCC: Adjust to recent sys::Path removal
Tobias Grosser [Fri, 14 Jun 2013 06:26:33 +0000 (06:26 +0000)]
PoCC: Adjust to recent sys::Path removal

llvm-svn: 183969

11 years agoRemove unused header.
Rafael Espindola [Fri, 14 Jun 2013 04:31:19 +0000 (04:31 +0000)]
Remove unused header.

llvm-svn: 183968

11 years agoEmit initializers for static-storage-duration temporaries as constants where
Richard Smith [Fri, 14 Jun 2013 03:07:01 +0000 (03:07 +0000)]
Emit initializers for static-storage-duration temporaries as constants where
possible.

llvm-svn: 183967

11 years agoEnable FastISel on ARM for Linux and NaCl, not MCJIT
JF Bastien [Fri, 14 Jun 2013 02:49:43 +0000 (02:49 +0000)]
Enable FastISel on ARM for Linux and NaCl, not MCJIT

This is a resubmit of r182877, which was reverted because it broken
MCJIT tests on ARM. The patch leaves MCJIT on ARM as it was before: only
enabled for iOS. I've CC'ed people from the original review and revert.

FastISel was only enabled for iOS ARM and Thumb2, this patch enables it
for ARM (not Thumb2) on Linux and NaCl, but not MCJIT.

Thumb2 support needs a bit more work, mainly around register class
restrictions.

The patch punts to SelectionDAG when doing TLS relocation on non-Darwin
targets. I will fix this and other FastISel-to-SelectionDAG failures in
a separate patch.

The patch also forces FastISel to retain frame pointers: iOS always
keeps them for backtracking (so emitted code won't change because of
this), but Linux was getting much worse code that was incorrect when
using big frames (such as test-suite's lencod). I'll also fix this in a
later patch, it will probably require a peephole so that FastISel
doesn't rematerialize frame pointers back-to-back.

The test changes are straightforward, similar to:
  http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html
They also add a vararg test that got dropped in that change.

I ran all of lnt test-suite on A15 hardware with --optimize-option=-O0
and all the tests pass. All the tests also pass on x86 make check-all. I
also re-ran the check-all tests that failed on ARM, and they all seem to
pass.

llvm-svn: 183966

11 years ago[PECOFF] Fix build error on Win64.
Rui Ueyama [Fri, 14 Jun 2013 02:43:30 +0000 (02:43 +0000)]
[PECOFF] Fix build error on Win64.

llvm-svn: 183965

11 years ago[lld][PECOFF] Read relocation entries.
Rui Ueyama [Fri, 14 Jun 2013 02:30:34 +0000 (02:30 +0000)]
[lld][PECOFF] Read relocation entries.

Summary:
COFFReference class is defined to represent relocation information for
COFFDefinedAtom, as ELFReference for ELFDefinedAtom. ReaderCOFF can now
read relocation entries and create COFFReferences accordingly.

I need to make WriterPECOFF to handle the relocation references created by
the reader, but this patch is already big, so I think it's probably better
to get it reviewed now.

Reviewers: Bigcheese

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

llvm-svn: 183964

11 years ago[docs] Fix wrong clang-format example.
Rui Ueyama [Fri, 14 Jun 2013 02:12:06 +0000 (02:12 +0000)]
[docs] Fix wrong clang-format example.

llvm-svn: 183963

11 years ago[yaml2obj] Add support for sh_addralign via `AddressAlign` key.
Sean Silva [Fri, 14 Jun 2013 00:38:02 +0000 (00:38 +0000)]
[yaml2obj] Add support for sh_addralign via `AddressAlign` key.

For consistency, change the address in the test case from 0xDEADBEEF to
0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment.

llvm-svn: 183962

11 years agoAdded the ability options to:
Greg Clayton [Fri, 14 Jun 2013 00:30:23 +0000 (00:30 +0000)]
Added the ability options to:
- specify the architecture
- specify the platform
- specify if only external symbols should be dumped
- specify if types in the function signatures should be canonicalized

llvm-svn: 183961

11 years agoMove #include from .h to .cpp file.
Jakub Staszak [Fri, 14 Jun 2013 00:00:13 +0000 (00:00 +0000)]
Move #include from .h to .cpp file.

llvm-svn: 183960

11 years agoRemove unneeded include.
Greg Clayton [Thu, 13 Jun 2013 23:56:47 +0000 (23:56 +0000)]
Remove unneeded include.

llvm-svn: 183959

11 years agoRemove forward declaration of MachineBasicBlock. It is #included anyway.
Jakub Staszak [Thu, 13 Jun 2013 23:53:13 +0000 (23:53 +0000)]
Remove forward declaration of MachineBasicBlock. It is #included anyway.

llvm-svn: 183958

11 years ago#include <climits> instead of <limits.h> in C++ header file.
Jakub Staszak [Thu, 13 Jun 2013 23:49:09 +0000 (23:49 +0000)]
#include <climits> instead of <limits.h> in C++ header file.

llvm-svn: 183957

11 years agoRemove implicit fallthrough from AArch64 to Mips in lib selection
Tim Northover [Thu, 13 Jun 2013 22:54:55 +0000 (22:54 +0000)]
Remove implicit fallthrough from AArch64 to Mips in lib selection

Nothing useful to AArch64 will (should!) be found in any Mips-specific
directories.

Patch by Luke Zarko.

llvm-svn: 183956

11 years ago[yaml2obj] Add support for specifying raw section content.
Sean Silva [Thu, 13 Jun 2013 22:20:01 +0000 (22:20 +0000)]
[yaml2obj] Add support for specifying raw section content.

llvm-svn: 183955

11 years ago[yaml2obj] Add sh_addr via `Address` key.
Sean Silva [Thu, 13 Jun 2013 22:19:54 +0000 (22:19 +0000)]
[yaml2obj] Add sh_addr via `Address` key.

llvm-svn: 183954

11 years ago[yaml2obj] Initial ELF section support.
Sean Silva [Thu, 13 Jun 2013 22:19:48 +0000 (22:19 +0000)]
[yaml2obj] Initial ELF section support.

The current functionality is extremely basic and a bit rough around the
edges, but it will flesh out in future commits.

llvm-svn: 183953

11 years agoAvoid fallthrough in header, to allow external users of Clang libraries to
Richard Smith [Thu, 13 Jun 2013 22:07:02 +0000 (22:07 +0000)]
Avoid fallthrough in header, to allow external users of Clang libraries to
build with Clang's -Wimplicit-fallthrough warning enabled. The fallthrough
was not making this code better.

llvm-svn: 183952

11 years agoFix the linkage of static locals inside a CapturedStmt. (Found in the
Eli Friedman [Thu, 13 Jun 2013 21:50:44 +0000 (21:50 +0000)]
Fix the linkage of static locals inside a CapturedStmt.  (Found in the
process of trying to fix the related issue for block literals.)

llvm-svn: 183951

11 years agoTry to fix the windows build.
Rafael Espindola [Thu, 13 Jun 2013 21:38:21 +0000 (21:38 +0000)]
Try to fix the windows build.

llvm-svn: 183950

11 years agoAdded a new makefile setting that can be set in LLDB makefiles: USE_LIBCPP. This...
Greg Clayton [Thu, 13 Jun 2013 21:27:14 +0000 (21:27 +0000)]
Added a new makefile setting that can be set in LLDB makefiles: USE_LIBCPP. This will enable libc++ support.
Improved the makefile "clean" to include deleting all ".d.[0-9]+" files.

Added options to the "lldb/examples/lookup" example and made it build using the LLDB_BUILD_DIR. If this is not set, it will default to "/Applications/Xcode.app/Contents/SharedFrameworks" on Darwin.

Added options to the "lldb/examples/function" example and made it build using the LLDB_BUILD_DIR.

llvm-svn: 183949

11 years agoAdded a SBSection::GetParent() to the API.
Greg Clayton [Thu, 13 Jun 2013 21:23:23 +0000 (21:23 +0000)]
Added a SBSection::GetParent() to the API.

llvm-svn: 183948

11 years agoDon't use PathV1.h in Signals.h.
Rafael Espindola [Thu, 13 Jun 2013 21:16:58 +0000 (21:16 +0000)]
Don't use PathV1.h in Signals.h.

llvm-svn: 183947

11 years agoDon't depend on the transitive inclusion of PathV1.h
Rafael Espindola [Thu, 13 Jun 2013 21:10:56 +0000 (21:10 +0000)]
Don't depend on the transitive inclusion of PathV1.h

llvm-svn: 183946

11 years agoDon't depend on the transitive inclusion of PathV1.h.
Rafael Espindola [Thu, 13 Jun 2013 21:09:29 +0000 (21:09 +0000)]
Don't depend on the transitive inclusion of PathV1.h.

llvm-svn: 183945

11 years agoUse the sys::RemoveFileOnSignal that takes a StringRef.
Rafael Espindola [Thu, 13 Jun 2013 21:02:40 +0000 (21:02 +0000)]
Use the sys::RemoveFileOnSignal that takes a StringRef.

llvm-svn: 183944

11 years agoAdd a RemoveFileOnSignal that takes a StringRef.
Rafael Espindola [Thu, 13 Jun 2013 21:01:17 +0000 (21:01 +0000)]
Add a RemoveFileOnSignal that takes a StringRef.

llvm-svn: 183943

11 years agoFollowup to r183931 to fix the lambda conversion-to-block-pointer member.
Eli Friedman [Thu, 13 Jun 2013 20:56:27 +0000 (20:56 +0000)]
Followup to r183931 to fix the lambda conversion-to-block-pointer member.

llvm-svn: 183942

11 years agoDon't use PathV1.h in FileUtilities.h.
Rafael Espindola [Thu, 13 Jun 2013 20:41:00 +0000 (20:41 +0000)]
Don't use PathV1.h in FileUtilities.h.

llvm-svn: 183941

11 years agoAvoid using PathV1.h in Program.h.
Rafael Espindola [Thu, 13 Jun 2013 20:25:38 +0000 (20:25 +0000)]
Avoid using PathV1.h in Program.h.

llvm-svn: 183940

11 years ago[PowerPC] Disable fast-isel for existing -O0 tests for PowerPC.
Bill Schmidt [Thu, 13 Jun 2013 20:23:34 +0000 (20:23 +0000)]
[PowerPC] Disable fast-isel for existing -O0 tests for PowerPC.

This is a preliminary patch for fast instruction selection on
PowerPC.  Code generation can differ between DAG isel and fast isel.
Existing tests that specify -O0 were written to expect DAG isel.  Make
this explicit by adding -fast-isel=false to the tests.

In some cases specifying -fast-isel=false produces different code even
when there isn't a fast instruction selector specified.  This is
because TM.Options.EnableFastISel = 1 at -O0 whether or not a FastISel
object exists.  Thus disabling fast isel can actually produce less
conservative code.  Because of this, some of the expected code
generation in the -O0 tests needs to be adjusted.

In particular, handling of function arguments is less conservative
with -fast-isel=false (see isOnlyUsedInEntryBlock() in
SelectionDAGBuilder.cpp).  This results in fewer stack accesses and,
in some cases, reduced stack size as uselessly loaded values are no
longer stored back to spill locations in the stack.

No functional change with this patch; test case adjustments only.

llvm-svn: 183939

11 years agoR600: Don't try to fix reg class when copying IMPLICIT_DEF to a register
Tom Stellard [Thu, 13 Jun 2013 20:14:00 +0000 (20:14 +0000)]
R600: Don't try to fix reg class when copying IMPLICIT_DEF to a register

The test case for this is way too complex to be useful as a lit test,
and I was unable to reduce it.

https://bugs.freedesktop.org/show_bug.cgi?id=65438

llvm-svn: 183937

11 years agoDon't depend on set being transitively included.
Rafael Espindola [Thu, 13 Jun 2013 20:10:23 +0000 (20:10 +0000)]
Don't depend on set being transitively included.

llvm-svn: 183936

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