1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

18153 Commits

Author SHA1 Message Date
Ulrich Weigand
2666834190 [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
2013-06-12 14:46:54 +00:00
Rafael Espindola
0aa6ee2d41 Remove Path::getSuffix.
llvm-svn: 183833
2013-06-12 14:32:51 +00:00
Rafael Espindola
89d2e1921d Remove sys::CopyFile.
llvm-svn: 183831
2013-06-12 14:16:52 +00:00
Patrik Hagglund
2c2535b8d0 Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm:🆑:GenericOptionValue').

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

llvm-svn: 183830
2013-06-12 14:15:21 +00:00
Rafael Espindola
528e53f9f1 Remove the old file memory mapping functions.
llvm-svn: 183828
2013-06-12 14:11:15 +00:00
Rafael Espindola
072d5a2178 Remove Path::createFileOnDisk.
llvm-svn: 183827
2013-06-12 13:59:17 +00:00
Rafael Espindola
dc7cb4d0c4 Remove Path::makeExecutableOnDisk.
llvm-svn: 183826
2013-06-12 13:55:07 +00:00
Rafael Espindola
191f66d683 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
2013-06-11 22:21:28 +00:00
Rui Ueyama
f9939fdb3c [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
2013-06-11 21:39:48 +00:00
Rafael Espindola
968c6bbebf Include PathV1.h in files that use it.
This is preparation for replacing Path.h with PathV2.h.

llvm-svn: 183782
2013-06-11 20:00:56 +00:00
Rafael Espindola
993b0c88c5 Remove Path::getDirname.
llvm-svn: 183780
2013-06-11 19:32:57 +00:00
Rafael Espindola
3eb11a9b44 Remove Path::getBasename.
llvm-svn: 183779
2013-06-11 19:29:48 +00:00
Rafael Espindola
0ee1fd1460 Remove Path::getLast.
llvm-svn: 183778
2013-06-11 19:25:17 +00:00
Rafael Espindola
cd1368e1db Remove GetDLLSuffix.
llvm-svn: 183777
2013-06-11 19:18:05 +00:00
Rafael Espindola
35b7309704 Remove GetRootDirectory.
llvm-svn: 183775
2013-06-11 19:13:52 +00:00
Rafael Espindola
e45b026a12 Remove GetUserHomeDirectory.
llvm-svn: 183773
2013-06-11 19:08:15 +00:00
Rafael Espindola
0ff7ea94a2 Don't define LTDL_SHLIBPATH_VAR.
llvm-svn: 183771
2013-06-11 19:04:13 +00:00
Rafael Espindola
30fee8bd79 Remove GetSystemLibraryPaths.
llvm-svn: 183770
2013-06-11 18:58:47 +00:00
Rafael Espindola
bafac8bf69 Don't define LLVM_LIBDIR, it is not used anymore.
llvm-svn: 183769
2013-06-11 18:52:11 +00:00
Rafael Espindola
018002f465 Remove Path::GetBitcodeLibraryPaths.
llvm-svn: 183765
2013-06-11 18:45:35 +00:00
Rafael Espindola
c5d8c2560a Remove unused FindLibrary function.
llvm-svn: 183764
2013-06-11 18:41:07 +00:00
Rafael Espindola
d506a5e174 Remove sys::identifyFileType.
llvm-svn: 183763
2013-06-11 18:18:02 +00:00
Rafael Espindola
3ae9fcd908 Fix variable name style. Don't cast to and from int.
This enables the compiler to see the enum and produce warnings about a switch
not being fully covered. Fix one of these warnings.

llvm-svn: 183749
2013-06-11 15:29:10 +00:00
Sean Silva
0145eeb66d Fix dubious type name similar to member name.
Should bring bots back to life.

llvm-svn: 183715
2013-06-11 00:13:52 +00:00
Sean Silva
f1bbb8885a Fix spurious semicolons.
Apparently these macros have semicolons inside of them already.

llvm-svn: 183712
2013-06-10 23:48:38 +00:00
Sean Silva
141d676063 [yaml2obj] Initial ELF support.
Currently, only emitting the ELF header is supported (no sections or
segments).

The ELFYAML code organization is broadly similar to the COFFYAML code.

llvm-svn: 183711
2013-06-10 23:44:15 +00:00
Rafael Espindola
1df3f4fedd Add a missing 'e'.
llvm-svn: 183692
2013-06-10 20:32:27 +00:00
Rafael Espindola
053c8c898f Remove the old IdentifyFileType now that lld was updated.
llvm-svn: 183671
2013-06-10 15:37:29 +00:00
Rafael Espindola
64def1c6ed Pass a StringRef to sys::identifyFileType.
llvm-svn: 183669
2013-06-10 15:27:39 +00:00
Rafael Espindola
3db8a7c316 Update for current naming conventions.
I will change identifyFileType to use a StringRef in the next patch.

llvm-svn: 183664
2013-06-10 14:56:16 +00:00
Duncan Sands
5f79506fd3 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).

llvm-svn: 183650
2013-06-10 12:09:30 +00:00
Benjamin Kramer
c8444f6f89 Add a const version of findNearestCommonDominator to PostDom for convenience.
PR16283.

llvm-svn: 183629
2013-06-09 15:09:30 +00:00
Aaron Ballman
8be7652e28 sys::process::get_id() now returns the process ID instead of a process handle on Windows. Patch thanks to Kim Gräsman!
llvm-svn: 183621
2013-06-08 20:29:03 +00:00
Manman Ren
c327cbd696 No functionality change.
Constify a few member functions.

llvm-svn: 183546
2013-06-07 18:53:29 +00:00
Manman Ren
a9cbca5c30 DIBuilder: No functionality change.
Use the correct DIType when creating types in DIBuilder.

llvm-svn: 183543
2013-06-07 18:35:53 +00:00
Rafael Espindola
81fff91aac Make operator== non-member for greater symmetry.
Thanks to David Blaikie for the suggestion.

llvm-svn: 183539
2013-06-07 18:00:04 +00:00
Rui Ueyama
8be98a268d [Object/COFF] BaseOfData field should be absent in PE32+.
llvm-svn: 183534
2013-06-07 16:58:30 +00:00
Benjamin Kramer
2fbc7287e4 BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.
llvm-svn: 183525
2013-06-07 15:14:31 +00:00
Benjamin Kramer
5f752c703f Optimize BitVector::all().
llvm-svn: 183521
2013-06-07 14:14:38 +00:00
Manman Ren
177367f799 DIBuilder: No functionality change.
Use the correct DIType when creating vector types.

llvm-svn: 183484
2013-06-07 03:13:46 +00:00
Jakub Staszak
df12041c3b Remove unneeded #include.
llvm-svn: 183460
2013-06-06 23:34:11 +00:00
Kevin Enderby
644e3fc29e 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

llvm-svn: 183424
2013-06-06 17:20:50 +00:00
Rafael Espindola
a1d5ce4045 Print symbol names in relocations when dumping COFF as YAML.
llvm-svn: 183403
2013-06-06 13:06:17 +00:00
Sean Silva
92096509dc Add some class documentation to BinaryRef.
llvm-svn: 183362
2013-06-06 00:47:12 +00:00
Bill Wendling
2cca7e5acd Cache the TargetLowering info object as a pointer.
Caching it as a pointer allows us to reset it if the TargetMachine object
changes.

llvm-svn: 183361
2013-06-06 00:43:09 +00:00
Bill Wendling
62a5cc40ee 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.

llvm-svn: 183356
2013-06-06 00:11:39 +00:00
Sean Silva
262d1afcd6 Rename operator== parameter to RHS.
The previous name `Ref` is overly generic.

llvm-svn: 183354
2013-06-05 23:58:14 +00:00
Sean Silva
e61870890f 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.

llvm-svn: 183353
2013-06-05 23:55:26 +00:00
Sean Silva
66fceb99ee Add writeAsHex(raw_ostream &) method to BinaryRef.
This hides the implementation. A future commit will remove the
error-prone getHex() and getBinary() methods.

llvm-svn: 183352
2013-06-05 23:47:23 +00:00
Sean Silva
58f67d3878 Rename BinaryRef::isBinary to more descriptive DataIsHexString.
And add a doxygen comment.

llvm-svn: 183350
2013-06-05 23:32:31 +00:00