Commit Graph

18173 Commits

Author SHA1 Message Date
Rafael Espindola
6d315c6cf2 Add a missing 'e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 20:32:27 +00:00
Rafael Espindola
27b7adef95 Remove the old IdentifyFileType now that lld was updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183671 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 15:37:29 +00:00
Rafael Espindola
f12745f7a7 Pass a StringRef to sys::identifyFileType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 15:27:39 +00:00
Rafael Espindola
91de80a535 Update for current naming conventions.
I will change identifyFileType to use a StringRef in the next patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183664 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 14:56:16 +00:00
Duncan Sands
48d5e750a8 Avoid warnings about unused parameters that tend to come up a lot when
building outside projects with a different compiler than that used to build
LLVM itself (eg switching between gcc and clang).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183650 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 12:09:30 +00:00
Benjamin Kramer
3ade978551 Add a const version of findNearestCommonDominator to PostDom for convenience.
PR16283.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183629 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-09 15:09:30 +00:00
Aaron Ballman
0c79301807 sys::process::get_id() now returns the process ID instead of a process handle on Windows. Patch thanks to Kim Gräsman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183621 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-08 20:29:03 +00:00
Manman Ren
eda4b8e674 No functionality change.
Constify a few member functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183546 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 18:53:29 +00:00
Manman Ren
576d49a775 DIBuilder: No functionality change.
Use the correct DIType when creating types in DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183543 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 18:35:53 +00:00
Rafael Espindola
814b52710a Make operator== non-member for greater symmetry.
Thanks to David Blaikie for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 18:00:04 +00:00
Rui Ueyama
2e2630b462 [Object/COFF] BaseOfData field should be absent in PE32+.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183534 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 16:58:30 +00:00
Benjamin Kramer
a77376dae1 BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 15:14:31 +00:00
Benjamin Kramer
597253da97 Optimize BitVector::all().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183521 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 14:14:38 +00:00
Manman Ren
37bfb18f8f DIBuilder: No functionality change.
Use the correct DIType when creating vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183484 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 03:13:46 +00:00
Jakub Staszak
326ae27c4f Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183460 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 23:34:11 +00:00
Kevin Enderby
54154f3bf1 Teach llvm-objdump with the -macho parser how to use the data in code table
from the LC_DATA_IN_CODE load command.  And when disassembling print
the data in code formatted for the kind of data it and not disassemble those
bytes.

I added the format specific functionality to the derived class MachOObjectFile
since these tables only appears in Mach-O object files. This is my first
attempt to modify the libObject stuff so if folks have better suggestions
how to fit this in or suggestions on the implementation please let me know.

rdar://11791371


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 17:20:50 +00:00
Rafael Espindola
e3a0e7f29d Print symbol names in relocations when dumping COFF as YAML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183403 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 13:06:17 +00:00
Sean Silva
272d881234 Add some class documentation to BinaryRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183362 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 00:47:12 +00:00
Bill Wendling
6a2e7ac0b6 Cache the TargetLowering info object as a pointer.
Caching it as a pointer allows us to reset it if the TargetMachine object
changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183361 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 00:43:09 +00:00
Bill Wendling
384ceb8446 Don't cache the TargetLoweringInfo object inside of the FunctionLowering object.
The TargetLoweringInfo object is owned by the TargetMachine. In the future, the
TargetMachine object may change, which may also change the TargetLoweringInfo
object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 00:11:39 +00:00
Sean Silva
cfb476fb20 Rename operator== parameter to RHS.
The previous name `Ref` is overly generic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 23:58:14 +00:00
Sean Silva
0d861a24d8 Remove error-prone methods of BinaryRef.
A user shouldn't care about the internal state, and these methods by
their very nature require asserting a predicate on the internal state.
As such, they cannot be used safely without introducing hidden
long-distance dependencies on the manner of construction of the
BinaryRef.

Use writeAsBinary(raw_ostream &) and writeAsHex(raw_ostream &) if you
need to access the data in a binary or hex format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183353 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 23:55:26 +00:00
Sean Silva
4370ddb8b8 Add writeAsHex(raw_ostream &) method to BinaryRef.
This hides the implementation. A future commit will remove the
error-prone getHex() and getBinary() methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 23:47:23 +00:00
Sean Silva
6acc982e74 Rename BinaryRef::isBinary to more descriptive DataIsHexString.
And add a doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 23:32:31 +00:00
Sean Silva
63958fba58 Add BinaryRef binary_size() method.
This avoids making assumptions about the data representation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 23:32:27 +00:00
Sean Silva
2b1068952a Comment BinaryRef::Data.
Also, state an invariant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 23:32:23 +00:00
Sean Silva
639adc59f8 Add writeAsBinary(raw_ostream &) method to BinaryRef.
Previously, yaml2coff.cpp had a writeHexData static helper function to
do this, but it is generally useful functionality.

Also, validate hex strings up-front to avoid running having to handle
errors "deep inside" the yaml2obj code (it also gives better diagnostics
than it used to).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 22:59:00 +00:00
Sean Silva
d56d756611 [ELF] Add ELFOSABI_GNU.
ELFOSABI_LINUX is a historical alias for ELFOSABI_GNU according to
<http://www.sco.com/developers/gabi/latest/ch4.eheader.html>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183339 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 20:55:58 +00:00
Rafael Espindola
c9f2cc7e05 Don't hide the first ELF symbol.
The first symbol on ELF is dummy, but it has a defined content and readelf
normally displays it. With this change llvm-readobj also displays it and we
can check that llvm-mc output is correct according to the standard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183337 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 20:33:54 +00:00
Rafael Espindola
bcb1ea8ef6 Represent symbols with a SymbolIndex,SectionIndex pair.
With this patch we use the SectionIndex directly, instead of counting the
number of symbol tables. This saves a DenseMap lookup every time we want to
find which symbol a relocation refers to.

Also simplify based on the fact that there is at most one SHT_SYMTAB and one
SHT_DYNSYM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183326 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 17:54:19 +00:00
Sylvestre Ledru
7e129466d8 The GNU/HURD is also using the libc. Therefor, endian.h should be included, not machine/endian.h. See full build log https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.3&arch=hurd-i386&ver=1%3A3.3~%2Brc3-1~exp1&stamp=1370358869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183303 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 09:17:26 +00:00
Rafael Espindola
23a22cdedd Don't print default values for NumberOfAuxSymbols and AuxiliaryData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 03:20:13 +00:00
Rafael Espindola
5fd5fe0f7b Move BinaryRef to a new include/llvm/Object/YAML.h file.
It will be used for ELF dumping too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183287 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 02:32:26 +00:00
Rafael Espindola
6c1202c459 Handle relocations that don't point to symbols.
In ELF (as in MachO), not all relocations point to symbols. Represent this
properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj
ELF's dumper to handle relocatios without symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 01:33:53 +00:00
Michael Gottesman
b30718af1a IEEE-754R 5.7.2 General Operations is* operations (except for isCanonical).
Specifically the following work was done:

1. If the operation was not implemented, I implemented it.

2. If the operation was already implemented, I just moved its location
in the APFloat header into the IEEE-754R 5.7.2 section. If the name was
incorrect, I put in a comment giving the true IEEE-754R name.

Also unittests have been added for all of the functions which did not
already have a unittest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 03:46:25 +00:00
Manuel Klimek
abff3aa821 Introduce needsCleanup() for APFloat and APInt.
This is needed in clang so one can check if the object needs the
destructor called after its memory was freed. This is useful when
creating many APInt/APFloat objects with placement new, where the
overhead of tracking the pointers for cleanup is significant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183100 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-03 13:03:05 +00:00
Rui Ueyama
0a972fa1ef [Object/COFF] Add dos_header, pe32{,plus}_header and data_directory.
Reviewers: Bigcheese

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183087 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-02 21:08:45 +00:00
Jim Grosbach
2ee6c7ff80 Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-02 19:51:54 +00:00
Benjamin Kramer
7c2b4be2a7 Move getRealLinkageName to a common place and remove all the duplicates of it.
Also simplify code a bit while there. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183076 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 17:51:14 +00:00
Benjamin Kramer
da8b91a073 DenseMap: Move the key into place when we use the move version of operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 16:37:55 +00:00
Michael Gottesman
2e2922cd90 Removed a comment above an include which is unnecessary and added a missing closing @} for a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 00:48:24 +00:00
Michael Gottesman
8a70f5815d Added method comments for getZero,getInf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 00:44:29 +00:00
Michael Gottesman
7f88a3b20d Updated APFloat's comments to fit the LLVM style guide.
Also added a few more method comments and performed some copy editing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183063 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 00:44:05 +00:00
Ahmed Bougacha
23ed37a6b7 Make SubRegIndex size mandatory, following r183020.
This also makes TableGen able to compute sizes/offsets of synthesized
indices representing tuples.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183061 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 23:45:26 +00:00
Eric Christopher
769d24a60d Add support for adding the contents of a StringRef to the MD5 hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 22:34:56 +00:00
Eric Christopher
800e6ee52f Move "unsigned char" -> "uint8_t".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 22:34:34 +00:00
Quentin Colombet
06f5ebc5a1 Loop Strength Reduce: Scaling factor cost.
Account for the cost of scaling factor in Loop Strength Reduce when rating the
formulae. This uses a target hook.

The default implementation of the hook is: if the addressing mode is legal, the
scaling factor is free.

<rdar://problem/13806271>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183045 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 21:29:03 +00:00
Rafael Espindola
e17388fd34 Use just a ArrayRef<uint8_t> to store both hex string and binary data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 21:03:51 +00:00
Rafael Espindola
06120815a2 Rename COFFYaml.h to COFFYAML.h for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 20:38:27 +00:00
Rafael Espindola
0e07d1a93d Remove union to fix build in c++03.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 20:35:58 +00:00