platform/upstream/llvm.git
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

11 years agoRemove the old file memory mapping functions.
Rafael Espindola [Wed, 12 Jun 2013 14:11:15 +0000 (14:11 +0000)]
Remove the old file memory mapping functions.

llvm-svn: 183828

11 years agoRemove Path::createFileOnDisk.
Rafael Espindola [Wed, 12 Jun 2013 13:59:17 +0000 (13:59 +0000)]
Remove Path::createFileOnDisk.

llvm-svn: 183827

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

llvm-svn: 183826

11 years agoUpdate Release Process doc
Renato Golin [Wed, 12 Jun 2013 11:35:33 +0000 (11:35 +0000)]
Update Release Process doc

llvm-svn: 183825

11 years agoFix gcc -flto build, by adding LLVM_ATTRIBUTE_USED to
Patrik Hagglund [Wed, 12 Jun 2013 08:45:39 +0000 (08:45 +0000)]
Fix gcc -flto build, by adding LLVM_ATTRIBUTE_USED to
LLVMX86CompilationCallback2, called from inline asm.

llvm-svn: 183824

11 years agoFix memory corruption in CStringChecker
Pavel Labath [Wed, 12 Jun 2013 07:45:04 +0000 (07:45 +0000)]
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

11 years ago<rdar://problem/11914077>
Enrico Granata [Wed, 12 Jun 2013 01:50:57 +0000 (01:50 +0000)]
<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

11 years agoAdd support for complex compound assignments where the LHS is a scalar.
Eli Friedman [Wed, 12 Jun 2013 01:40:06 +0000 (01:40 +0000)]
Add support for complex compound assignments where the LHS is a scalar.

Fixes <rdar://problem/11224126> and PR12790.

llvm-svn: 183821

11 years agoHuge performance improvements when one breakpoint contains many locations.
Greg Clayton [Wed, 12 Jun 2013 00:46:38 +0000 (00:46 +0000)]
Huge performance improvements when one breakpoint contains many locations.

325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote.

That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly.

Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed.

llvm-svn: 183820

11 years ago[test] fix test as the atom name is available only in DEBUG mode
Shankar Easwaran [Wed, 12 Jun 2013 00:46:37 +0000 (00:46 +0000)]
[test] fix test as the atom name is available only in DEBUG mode

llvm-svn: 183819

11 years ago<rdar://problem/13299214>
Enrico Granata [Wed, 12 Jun 2013 00:44:43 +0000 (00:44 +0000)]
<rdar://problem/13299214>

Make the error message here more interesting for the user

llvm-svn: 183818

11 years ago[ELF][X86_64] Create GOT entries for external TLS symbols properly without Segfaults.
Shankar Easwaran [Wed, 12 Jun 2013 00:32:39 +0000 (00:32 +0000)]
[ELF][X86_64] Create GOT entries for external TLS symbols properly without Segfaults.

llvm-svn: 183817

11 years ago[ELF] NMAGIC support : Find the BSS section to setup the virtual address of _end.
Shankar Easwaran [Wed, 12 Jun 2013 00:32:35 +0000 (00:32 +0000)]
[ELF] NMAGIC support :  Find the BSS section to setup the virtual address of _end.

llvm-svn: 183816

11 years ago[ELF] TBSS section has to be special cased so that it doesnot occupy memory space
Shankar Easwaran [Wed, 12 Jun 2013 00:32:32 +0000 (00:32 +0000)]
[ELF] TBSS section has to be special cased so that it doesnot occupy memory space

llvm-svn: 183815

11 years agoRemoving a redundant write
Enrico Granata [Wed, 12 Jun 2013 00:32:31 +0000 (00:32 +0000)]
Removing a redundant write

llvm-svn: 183814

11 years agoMake va_arg and argument passing to varargs functions work correctly with
Eli Friedman [Wed, 12 Jun 2013 00:13:45 +0000 (00:13 +0000)]
Make va_arg and argument passing to varargs functions work correctly with
AVX vectors when AVX is turned on.

Fixes <rdar://problem/10513611>.

llvm-svn: 183813

11 years agoUpdate TestRegisters for running on Linux (filed llvm.org/pr16301)
Daniel Malea [Wed, 12 Jun 2013 00:13:43 +0000 (00:13 +0000)]
Update TestRegisters for running on Linux (filed llvm.org/pr16301)
- skip the attach cases in TestRegisters.py -- caused slowness/sigabrt
- fixed log file removal function (in case test is run with -# flag)

llvm-svn: 183812

11 years ago[yaml2obj] Remove fragile test case.
Sean Silva [Wed, 12 Jun 2013 00:01:26 +0000 (00:01 +0000)]
[yaml2obj] Remove fragile test case.

This test case was a "sanity check"/"breathing" test case at first, but
is really fragile, which impairs changes to yaml2obj.

`test/Object/yaml2obj-elf-bits-endian.test` is much more robust and
serves as an adequate sanity check.

llvm-svn: 183811

11 years ago80-cols
Sean Silva [Wed, 12 Jun 2013 00:01:22 +0000 (00:01 +0000)]
80-cols

This slipped in during a hasty renaming.

llvm-svn: 183810

11 years agoCorrect the def registers for the 8bit x86 divide instructions to
Eric Christopher [Tue, 11 Jun 2013 23:41:44 +0000 (23:41 +0000)]
Correct the def registers for the 8bit x86 divide instructions to
match the comments and what the instruction actually does. Noticed
on inspection.

llvm-svn: 183809

11 years agoUse the Copy we defined above here.
Eric Christopher [Tue, 11 Jun 2013 23:41:41 +0000 (23:41 +0000)]
Use the Copy we defined above here.

llvm-svn: 183808

11 years agoFormatting.
Eric Christopher [Tue, 11 Jun 2013 23:41:38 +0000 (23:41 +0000)]
Formatting.

llvm-svn: 183807

11 years ago[Darwin][Driver] Add unit tests.
Rui Ueyama [Tue, 11 Jun 2013 23:07:43 +0000 (23:07 +0000)]
[Darwin][Driver] Add unit tests.

llvm-svn: 183806

11 years agoImprovements to the data formatters SB API:
Enrico Granata [Tue, 11 Jun 2013 22:58:32 +0000 (22:58 +0000)]
Improvements to the data formatters SB API:

- exposing new accessors: formats/format, ..., that allow you to iterate over all formatters
 e.g. sys_category = lldb.debugger.GetCategory("system").summary['char *']
- ensuring that C++-based synthetic children provider can at least print their description accurately, if nothing else

llvm-svn: 183805

11 years agoFix CMakeLists.
Akira Hatanaka [Tue, 11 Jun 2013 22:36:30 +0000 (22:36 +0000)]
Fix CMakeLists.

llvm-svn: 183804

11 years agoTweak r183791 so we don't print a note without a source location.
Eli Friedman [Tue, 11 Jun 2013 22:26:34 +0000 (22:26 +0000)]
Tweak r183791 so we don't print a note without a source location.

llvm-svn: 183803

11 years ago[mips] Add an IR transformation pass that optimizes calls to sqrt.
Akira Hatanaka [Tue, 11 Jun 2013 22:21:44 +0000 (22:21 +0000)]
[mips] Add an IR transformation pass that optimizes calls to sqrt.

The pass emits a call to sqrt that has attribute "read-none". This call will be
converted to an ISD::FSQRT node during DAG construction, which will turn into
a mips native sqrt instruction.

llvm-svn: 183802

11 years agoMove PathV2.h to Path.h
Rafael Espindola [Tue, 11 Jun 2013 22:21:28 +0000 (22:21 +0000)]
Move PathV2.h to Path.h

Most clients have already been moved from Path V1 to V2. The ones using V1
now include PathV1.h explicitly.

llvm-svn: 183801

11 years agoScopDetect: check region entering edges are valid.
Sebastian Pop [Tue, 11 Jun 2013 22:20:40 +0000 (22:20 +0000)]
ScopDetect: check region entering edges are valid.

When a region header is part of a loop, then all entering edges of this region
should not come from the loop but outside the region. Otherwise, the loop may be
only partially part of the region, which would cause troubles in handling
induction variables.

Currently, we can only model induction variables that are either fully part of
the scop (loop induction variable) or induction variables that are scop-
invariant (parameter). A loop that is only partially part of the
scop causes troubles, as there is no good way to handle the induction
variable in the independent blocks pass.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 183800

11 years agoscop detection: remove an iteration over all uses
Sebastian Pop [Tue, 11 Jun 2013 22:20:35 +0000 (22:20 +0000)]
scop detection: remove an iteration over all uses

llvm-svn: 183799

11 years agoscop detection: run isValidLoop as early as possible
Sebastian Pop [Tue, 11 Jun 2013 22:20:32 +0000 (22:20 +0000)]
scop detection: run isValidLoop as early as possible

to discard regions with invalid loops before going through the contents of the
basic blocks

llvm-svn: 183798

11 years agoscop detection: run isValidCFG as early as possible
Sebastian Pop [Tue, 11 Jun 2013 22:20:27 +0000 (22:20 +0000)]
scop detection: run isValidCFG as early as possible

to discard regions with invalid CFG before going through the contents of the
basic blocks

llvm-svn: 183797

11 years agoInclude Path.h instead of PathV2.h.
Rafael Espindola [Tue, 11 Jun 2013 22:17:04 +0000 (22:17 +0000)]
Include Path.h instead of PathV2.h.

I am about to move PathV2.h to Path.h.

llvm-svn: 183796

11 years agoInclude Path.h instead of PathV2.h.
Rafael Espindola [Tue, 11 Jun 2013 22:15:02 +0000 (22:15 +0000)]
Include Path.h instead of PathV2.h.

I am about to move PathV2.h to Path.h.

llvm-svn: 183795

11 years agoARM FastISel fix sext/zext fold
JF Bastien [Tue, 11 Jun 2013 22:13:46 +0000 (22:13 +0000)]
ARM FastISel fix sext/zext fold

Sign- and zero-extension folding was slightly incorrect because it wasn't checking that the shift on extensions was zero. Further, I recently added AND rd, rn, #255 as a form of 8-bit zero extension, and failed to add the folding code for it.

This patch fixes both issues.

This patch fixes both, and the test should remain the same:
  test/CodeGen/ARM/fast-isel-fold.ll

llvm-svn: 183794

11 years ago<rdar://problem/13646047>
Enrico Granata [Tue, 11 Jun 2013 22:06:06 +0000 (22:06 +0000)]
<rdar://problem/13646047>

Providing a Python helper SBData.CreateDataFromInt() to make an SBData out of a single integer number
It tries to use the current target, if any, for endianness and pointer size, and it picks a reasonable size on your behalf - if there is no way it can infer anything reasonable it essentially picks a 64-bit Mac as the reference model

llvm-svn: 183793

11 years agoUse llvm::APFloat for formatting if a target is available. Each target when debugging...
Greg Clayton [Tue, 11 Jun 2013 21:56:55 +0000 (21:56 +0000)]
Use llvm::APFloat for formatting if a target is available. Each target when debugging has a "ASTContext" that helps us to use the correct floating point semantics. Now that APFloat supports toString we now use that. If we don't have a target, we still fall back on the old display methodology, but the important formatting should always have a target available and thus use the compiler floating point code.

Modified the test programs to use floating point constants that always will display correctly. We had some numbers that were being rounded, and now that we are using clang, we no longer round them and we get more correct results.

llvm-svn: 183792

11 years agoCorrectly handle designated initializers which modify an array initialized
Eli Friedman [Tue, 11 Jun 2013 21:48:11 +0000 (21:48 +0000)]
Correctly handle designated initializers which modify an array initialized
with a string.  This case is sort of tricky because we can't modify the
StringLiteral used to represent such initializers.
We are forced to decompose the string into individual characters.

Fixes <rdar://problem/10465114>.

llvm-svn: 183791

11 years agoMake host ARM CPU feature detection independent of the vendor
Tobias Grosser [Tue, 11 Jun 2013 21:45:01 +0000 (21:45 +0000)]
Make host ARM CPU feature detection independent of the vendor

For ARM on linux we use /proc/cpuinfo to detect the host CPU's features.
Linux derives these values without ever looking at the vendor of the
specific CPU implementation. Hence, it adds little value, if we parse
the output of /proc/cpuinfo only for certain vendors.

This patch enables us to derive the correct feature flags e.g. for Qualcomm
CPUs.

llvm-svn: 183790

11 years ago[PECOFF][Writer] Structure of pe32_header was changed.
Rui Ueyama [Tue, 11 Jun 2013 21:39:58 +0000 (21:39 +0000)]
[PECOFF][Writer] Structure of pe32_header was changed.

Change for http://llvm-reviews.chandlerc.com/D952

Reviewers: Bigcheese

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

llvm-svn: 183789

11 years ago[PECOFF] Remove COFF header from PE header for simplicity.
Rui Ueyama [Tue, 11 Jun 2013 21:39:48 +0000 (21:39 +0000)]
[PECOFF] Remove COFF header from PE header for simplicity.

COFF header is always present both in executable and in object file. PE header
is present only in executable. So the natural way to handle PE/COFF file is
treating COFF is mandatory header and PE is optional. Current data structre
does not allow it, because PE header includes COFF header. Removing COFF
header will simplify the code to handle PE/COFF files.

Reviewers: Bigcheese

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

llvm-svn: 183788

11 years agoAdd a testcase for PR7434, which is a bug we no longer appear to have.
Richard Smith [Tue, 11 Jun 2013 20:38:45 +0000 (20:38 +0000)]
Add a testcase for PR7434, which is a bug we no longer appear to have.

llvm-svn: 183787

11 years agoInclude PathV1.h in a file that uses it.
Rafael Espindola [Tue, 11 Jun 2013 20:31:32 +0000 (20:31 +0000)]
Include PathV1.h in a file that uses it.

llvm-svn: 183786

11 years agoMore build fixes.
Rafael Espindola [Tue, 11 Jun 2013 20:24:32 +0000 (20:24 +0000)]
More build fixes.

llvm-svn: 183785

11 years agoFix build after clang change r183781.
Rafael Espindola [Tue, 11 Jun 2013 20:12:07 +0000 (20:12 +0000)]
Fix build after clang change r183781.

llvm-svn: 183784

11 years agoTry to fix the windows build.
Rafael Espindola [Tue, 11 Jun 2013 20:06:05 +0000 (20:06 +0000)]
Try to fix the windows build.

llvm-svn: 183783

11 years agoInclude PathV1.h in files that use it.
Rafael Espindola [Tue, 11 Jun 2013 20:00:56 +0000 (20:00 +0000)]
Include PathV1.h in files that use it.

This is preparation for replacing Path.h with PathV2.h.

llvm-svn: 183782

11 years agoInclude PathV1.h in files that use it.
Rafael Espindola [Tue, 11 Jun 2013 19:59:07 +0000 (19:59 +0000)]
Include PathV1.h in files that use it.

This is preparation for replacing Path.h with PathV2.h.

llvm-svn: 183781

11 years agoRemove Path::getDirname.
Rafael Espindola [Tue, 11 Jun 2013 19:32:57 +0000 (19:32 +0000)]
Remove Path::getDirname.

llvm-svn: 183780

11 years agoRemove Path::getBasename.
Rafael Espindola [Tue, 11 Jun 2013 19:29:48 +0000 (19:29 +0000)]
Remove Path::getBasename.

llvm-svn: 183779

11 years agoRemove Path::getLast.
Rafael Espindola [Tue, 11 Jun 2013 19:25:17 +0000 (19:25 +0000)]
Remove Path::getLast.

llvm-svn: 183778

11 years agoRemove GetDLLSuffix.
Rafael Espindola [Tue, 11 Jun 2013 19:18:05 +0000 (19:18 +0000)]
Remove GetDLLSuffix.

llvm-svn: 183777

11 years agoRevert r183721. It caused cleanups to be delayed too long in some cases.
Richard Smith [Tue, 11 Jun 2013 19:14:25 +0000 (19:14 +0000)]
Revert r183721. It caused cleanups to be delayed too long in some cases.
Testcase to follow.

llvm-svn: 183776

11 years agoRemove GetRootDirectory.
Rafael Espindola [Tue, 11 Jun 2013 19:13:52 +0000 (19:13 +0000)]
Remove GetRootDirectory.

llvm-svn: 183775

11 years agoMaking our Python decrefs NULL-safe
Enrico Granata [Tue, 11 Jun 2013 19:13:50 +0000 (19:13 +0000)]
Making our Python decrefs NULL-safe

llvm-svn: 183774

11 years agoRemove GetUserHomeDirectory.
Rafael Espindola [Tue, 11 Jun 2013 19:08:15 +0000 (19:08 +0000)]
Remove GetUserHomeDirectory.

llvm-svn: 183773

11 years ago<rdar://problem/13759177>
Enrico Granata [Tue, 11 Jun 2013 19:04:32 +0000 (19:04 +0000)]
<rdar://problem/13759177>

Allowing LLDB to resolve names of Python functions when they are located in classes
This allows things like *bound* classmethods to be used for formatters, commands, ...

llvm-svn: 183772

11 years agoDon't define LTDL_SHLIBPATH_VAR.
Rafael Espindola [Tue, 11 Jun 2013 19:04:13 +0000 (19:04 +0000)]
Don't define LTDL_SHLIBPATH_VAR.

llvm-svn: 183771

11 years agoRemove GetSystemLibraryPaths.
Rafael Espindola [Tue, 11 Jun 2013 18:58:47 +0000 (18:58 +0000)]
Remove GetSystemLibraryPaths.

llvm-svn: 183770

11 years agoDon't define LLVM_LIBDIR, it is not used anymore.
Rafael Espindola [Tue, 11 Jun 2013 18:52:11 +0000 (18:52 +0000)]
Don't define LLVM_LIBDIR, it is not used anymore.

llvm-svn: 183769

11 years agoReduce the number of symbols on the object file.
Samuel Benzaquen [Tue, 11 Jun 2013 18:51:07 +0000 (18:51 +0000)]
Reduce the number of symbols on the object file.

Summary:
Some compilers where failing with this file because the number of symbols was above 2**15.
- Replace std::list<> and std::vector<> with plain arrays.
- Change VariadicMatcherCreateCallback to be a function template, and a
  single class that wraps the instantiations.
- Remove some more unnecessary template arguments and function calls.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D948

llvm-svn: 183768

11 years ago[mips] Use function TargetInstrInfo::getRegClass.
Akira Hatanaka [Tue, 11 Jun 2013 18:48:16 +0000 (18:48 +0000)]
[mips] Use function TargetInstrInfo::getRegClass.

No functionality changes.

llvm-svn: 183767

11 years ago<rdar://problem/13779789>
Enrico Granata [Tue, 11 Jun 2013 18:47:55 +0000 (18:47 +0000)]
<rdar://problem/13779789>

Allow memory read -t to take persistent types (those defined with expression struct $....)

llvm-svn: 183766

11 years agoRemove Path::GetBitcodeLibraryPaths.
Rafael Espindola [Tue, 11 Jun 2013 18:45:35 +0000 (18:45 +0000)]
Remove Path::GetBitcodeLibraryPaths.

llvm-svn: 183765

11 years agoRemove unused FindLibrary function.
Rafael Espindola [Tue, 11 Jun 2013 18:41:07 +0000 (18:41 +0000)]
Remove unused FindLibrary function.

llvm-svn: 183764

11 years agoRemove sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:18:02 +0000 (18:18 +0000)]
Remove sys::identifyFileType.

llvm-svn: 183763

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:12:28 +0000 (18:12 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

llvm-svn: 183762

11 years agoFix documentation on the path to Bitcode reader/writer
Michael Liao [Tue, 11 Jun 2013 18:09:21 +0000 (18:09 +0000)]
Fix documentation on the path to Bitcode reader/writer

llvm-svn: 183761

11 years ago[libclang/python] Add a few "cursor kinds" that were missing in the python binding...
Argyrios Kyrtzidis [Tue, 11 Jun 2013 18:05:42 +0000 (18:05 +0000)]
[libclang/python] Add a few "cursor kinds" that were missing in the python binding for libclang.

Patch by Mathieu Baudet!

llvm-svn: 183760

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:05:26 +0000 (18:05 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

llvm-svn: 183759

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:01:14 +0000 (18:01 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

llvm-svn: 183758

11 years agoMake ASTContext::Allocate use size_t for the size argument.
Eli Friedman [Tue, 11 Jun 2013 17:58:38 +0000 (17:58 +0000)]
Make ASTContext::Allocate use size_t for the size argument.

llvm-svn: 183757

11 years agoChange how globalopt handles aliases in llvm.used.
Rafael Espindola [Tue, 11 Jun 2013 17:48:06 +0000 (17:48 +0000)]
Change how globalopt handles aliases in llvm.used.

Instead of a custom implementation of replaceAllUsesWith, we just call
replaceAllUsesWith and recreate llvm.used and llvm.compiler-used.

This change is particularity interesting because it makes llvm see
through what clang is doing with static used functions in extern "C"
contexts. With this change, running clang -O2 in

extern "C" {
  __attribute__((used)) static void foo() {}
}

produces

@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to
i8*)], section "llvm.metadata"
define internal void @foo() #0 {
entry:
  ret void
}

llvm-svn: 183756

11 years agoRemove eFormatHalfFloat as it isn't needed. eFormatFloat should be used and the byte...
Greg Clayton [Tue, 11 Jun 2013 17:32:06 +0000 (17:32 +0000)]
Remove eFormatHalfFloat as it isn't needed. eFormatFloat should be used and the byte size will tell us how to display it.

llvm-svn: 183755

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 17:28:56 +0000 (17:28 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

llvm-svn: 183754

11 years agoPort r183666 to identify_magic.
Rafael Espindola [Tue, 11 Jun 2013 17:25:45 +0000 (17:25 +0000)]
Port r183666 to identify_magic.

It will be tested in the next commit which moves another user to identify_magic.

Original message:

Fix an out of bounds array access.

We were looking at Magic[5] without checking Length. Since this path would not
return unless Length >= 18 anyway, just move the >= 18 check up.

llvm-svn: 183753

11 years agoFix variable name.
Rafael Espindola [Tue, 11 Jun 2013 17:22:12 +0000 (17:22 +0000)]
Fix variable name.

llvm-svn: 183752