Commit Graph

151329 Commits

Author SHA1 Message Date
Rui Ueyama 642c1a2968 [PECOFF] Fix build error on Win64.
llvm-svn: 183965
2013-06-14 02:43:30 +00:00
Rui Ueyama ef2c5413a9 [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
2013-06-14 02:30:34 +00:00
Rui Ueyama a6239aef11 [docs] Fix wrong clang-format example.
llvm-svn: 183963
2013-06-14 02:12:06 +00:00
Sean Silva 0a409cf04a [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
2013-06-14 00:38:02 +00:00
Greg Clayton 8ccc7f69cd 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
2013-06-14 00:30:23 +00:00
Jakub Staszak 80df8b837f Move #include from .h to .cpp file.
llvm-svn: 183960
2013-06-14 00:00:13 +00:00
Greg Clayton 4c1306cccc Remove unneeded include.
llvm-svn: 183959
2013-06-13 23:56:47 +00:00
Jakub Staszak be2bb923cd Remove forward declaration of MachineBasicBlock. It is #included anyway.
llvm-svn: 183958
2013-06-13 23:53:13 +00:00
Jakub Staszak cdb5ae6d7a #include <climits> instead of <limits.h> in C++ header file.
llvm-svn: 183957
2013-06-13 23:49:09 +00:00
Tim Northover fbb56b7bd9 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
2013-06-13 22:54:55 +00:00
Sean Silva 46dffffb39 [yaml2obj] Add support for specifying raw section content.
llvm-svn: 183955
2013-06-13 22:20:01 +00:00
Sean Silva f4bfcedfe5 [yaml2obj] Add sh_addr via `Address` key.
llvm-svn: 183954
2013-06-13 22:19:54 +00:00
Sean Silva 3820593160 [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
2013-06-13 22:19:48 +00:00
Richard Smith 5c508fc261 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
2013-06-13 22:07:02 +00:00
Eli Friedman d4b6e7a9b7 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
2013-06-13 21:50:44 +00:00
Rafael Espindola 5f81f48bd4 Try to fix the windows build.
llvm-svn: 183950
2013-06-13 21:38:21 +00:00
Greg Clayton 1767a73bc8 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
2013-06-13 21:27:14 +00:00
Greg Clayton 1d4c540688 Added a SBSection::GetParent() to the API.
llvm-svn: 183948
2013-06-13 21:23:23 +00:00
Rafael Espindola 4f35da77a6 Don't use PathV1.h in Signals.h.
llvm-svn: 183947
2013-06-13 21:16:58 +00:00
Rafael Espindola ffcfa52e2a Don't depend on the transitive inclusion of PathV1.h
llvm-svn: 183946
2013-06-13 21:10:56 +00:00
Rafael Espindola dcf73d2275 Don't depend on the transitive inclusion of PathV1.h.
llvm-svn: 183945
2013-06-13 21:09:29 +00:00
Rafael Espindola 18556de316 Use the sys::RemoveFileOnSignal that takes a StringRef.
llvm-svn: 183944
2013-06-13 21:02:40 +00:00
Rafael Espindola da85674db5 Add a RemoveFileOnSignal that takes a StringRef.
llvm-svn: 183943
2013-06-13 21:01:17 +00:00
Eli Friedman ef10282a0f Followup to r183931 to fix the lambda conversion-to-block-pointer member.
llvm-svn: 183942
2013-06-13 20:56:27 +00:00
Rafael Espindola 280e5cb653 Don't use PathV1.h in FileUtilities.h.
llvm-svn: 183941
2013-06-13 20:41:00 +00:00
Rafael Espindola 7c1023ad27 Avoid using PathV1.h in Program.h.
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Bill Schmidt 4a28e82743 [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
2013-06-13 20:23:34 +00:00
Tom Stellard adba083bc2 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
2013-06-13 20:14:00 +00:00
Rafael Espindola 09079162ee Don't depend on set being transitively included.
llvm-svn: 183936
2013-06-13 20:10:23 +00:00
Rafael Espindola cb4bb19070 Use the sys::ExecuteAndWait that takes StringRefs.
Also don't depend on Program.h including PathV1.h.

llvm-svn: 183935
2013-06-13 20:08:52 +00:00
Rafael Espindola 6828fe475a Add a version of sys::ExecuteAndWait that takes StringRefs.
llvm-svn: 183934
2013-06-13 20:06:28 +00:00
Derek Schuff ec9dc01b33 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
2013-06-13 19:51:17 +00:00
Greg Clayton 405fab9062 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
2013-06-13 19:39:56 +00:00
Eli Friedman 8f54e136f4 Fix a small bug in the linkage computation for the lambda conversion-to-function-pointer member.
llvm-svn: 183931
2013-06-13 19:39:48 +00:00
Rafael Espindola 0725a7d972 Update for llvm change.
llvm-svn: 183930
2013-06-13 19:25:45 +00:00
Rafael Espindola ff89ff297f Update for llvm change.
llvm-svn: 183929
2013-06-13 19:25:41 +00:00
Rafael Espindola 4c7ad8fc27 Have sys::FindProgramByName return a std::string.
llvm-svn: 183928
2013-06-13 19:25:37 +00:00
Benjamin Kramer c4d547d3ae Mips: Remove global set.
Backends shouldn't retain any global state. No functionality change.

llvm-svn: 183927
2013-06-13 19:06:52 +00:00
Rafael Espindola 3b3a166ce6 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
2013-06-13 18:34:17 +00:00
Reid Kleckner 12e0332bfd 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
2013-06-13 18:12:12 +00:00
Richard Smith 77ad7a2d3d Clean up test to appease NDEBUG builds.
llvm-svn: 183924
2013-06-13 18:07:12 +00:00
Greg Clayton 07a1d37b88 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
2013-06-13 18:03:11 +00:00
Rafael Espindola dd6b1d5273 InheritViz.cpp uses sys::Path, include PathV1.h
llvm-svn: 183922
2013-06-13 17:35:20 +00:00
Rafael Espindola 04fa5c17d8 Covert remaining graph viewers from sys::Path to std::string.
llvm-svn: 183921
2013-06-13 17:32:16 +00:00
Rafael Espindola 48944e7a9a Update code for other graph viewing programs too.
llvm-svn: 183920
2013-06-13 17:27:45 +00:00
Rafael Espindola ce61b1e5b1 Reduce usage of sys::Path in the graph writer.
Now PathV1.h is not needed in GraphWriter.h.

llvm-svn: 183919
2013-06-13 17:20:48 +00:00
Edwin Vane 230ecb2422 cpp11-migrate: const-correcting IncludeExcludeInfo
isFileIncluded() needed to be marked const.

llvm-svn: 183918
2013-06-13 17:19:37 +00:00
Edwin Vane 90706dd424 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
2013-06-13 17:17:32 +00:00
Rafael Espindola 7f20dfb746 Use version of DisplayGraph that takes a StringRef.
llvm-svn: 183916
2013-06-13 16:57:07 +00:00
Rafael Espindola 013b42cb1d Add a version of DisplayGraph that takes a StringRef.
llvm-svn: 183915
2013-06-13 16:56:13 +00:00