1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

43 Commits

Author SHA1 Message Date
Bill Wendling
0407ebb4f7 Rename Mangler linkage enums to something less gross.
llvm-svn: 76456
2009-07-20 19:41:27 +00:00
Bill Wendling
1a10a060cb Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.

llvm-svn: 76385
2009-07-20 01:03:30 +00:00
Chris Lattner
48e30f6d1f eliminate the Mangler::PreserveAsmNames bit, the sole client of this
can do it perfectly well itself.

llvm-svn: 75743
2009-07-15 04:50:47 +00:00
Chris Lattner
6ec578688d Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other 
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.

llvm-svn: 75646
2009-07-14 18:17:16 +00:00
Daniel Dunbar
3d0c94fbbc Revert r75610 (and r75620, which was blocking the revert), in the hopes of
unbreaking llvm-gcc (on Darwin).

--- Reverse-merging r75620 into '.':
U    include/llvm/Support/Mangler.h
--- Reverse-merging r75610 into '.':
U    test/CodeGen/X86/loop-hoist.ll
G    include/llvm/Support/Mangler.h
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
U    lib/VMCore/Mangler.cpp

llvm-svn: 75636
2009-07-14 15:57:55 +00:00
Chris Lattner
492f8619a2 remove renamed method.
llvm-svn: 75620
2009-07-14 06:22:15 +00:00
Chris Lattner
b0e0d16efb Change the X86 asmprinter to use the mangler to apply suffixes like "$non_lazy_ptr"
to symbols instead of doing it with "printSuffixedName".  This gets us to the point
where there is a real separation between computing a symbol name and printing it,
something I need for MC printer stuff.

This patch also fixes a corner case bug where unnamed private globals wouldn't get
the private label prefix.

Next up, rename all uses of getValueName -> getMangledName for better greppability,
and then tackle the ppc/arm backends to eliminate "printSuffixedName".

llvm-svn: 75610
2009-07-14 06:04:35 +00:00
Chris Lattner
2a6bb9bc51 Change the internal interface to makeNameProper to take a bool that
indicates whether the label is private or not, instead of taking
prefix stuff.  One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent.  For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.

llvm-svn: 75607
2009-07-14 04:50:12 +00:00
Chris Lattner
6460e403a7 rename Memo/Count to AnonGlobalIDs/NextAnonGlobalID to be more
descriptive.  Thange them to keep track of the ID of a global that is
assigned, not the first mangled name returned for it.  Without doing this,
we are required to always use the same suffix for a global that gets 
mangled.  This means that we can mangle the same global once with $stub
and another time with $non_lazy_ptr or whatever.

llvm-svn: 75561
2009-07-14 00:01:06 +00:00
Chris Lattner
1b09927043 remove Mangler::getTypeID and related data, it was only used for mangling
local symbols and we haven't had type planes since llvm 1.9.

llvm-svn: 75558
2009-07-13 23:50:53 +00:00
Chris Lattner
4ea397f845 remove mangler support for mangling local names. Mangler should only be
used with globals.

llvm-svn: 75557
2009-07-13 23:47:27 +00:00
Evan Cheng
0d781df8dc Quotes should be printed before private prefix; some code clean up.
llvm-svn: 71032
2009-05-05 22:50:29 +00:00
Misha Brukman
7ee4196e74 Removed trailing whitespace.
llvm-svn: 65196
2009-02-20 22:51:36 +00:00
Rafael Espindola
0aba6c9435 Add the private linkage.
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Rafael Espindola
2fed481c49 Remove some dead code from the days llvm had type planes.
There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(

llvm-svn: 62088
2009-01-12 15:53:25 +00:00
Evan Cheng
80f6966c7f - Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map with DenseMap, std::set with SmallPtrSet. This results in minor speed up.
- Some code clean up.

llvm-svn: 53379
2008-07-10 00:04:23 +00:00
Owen Anderson
fd1b58fd7b Use a DenseMap instead of an std::map for mangled name lookup. This is
improves AsmPrinter runtime on instcombine from 0.3920s to 0.3836s.

llvm-svn: 52787
2008-06-26 17:20:16 +00:00
Dan Gohman
a84b75df17 Remove uses of llvm/System/IncludeFile.h that are no longer needed.
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Bill Wendling
d269356b02 Add support for appending a suffix to the end of a mangled name.
llvm-svn: 42071
2007-09-17 22:39:32 +00:00
Reid Spencer
3e54e72ef1 Fix minor doxygen nits.
llvm-svn: 40854
2007-08-05 20:06:04 +00:00
Chris Lattner
47f39eb3db Add new option to leave asm names alone
llvm-svn: 30149
2006-09-07 18:20:41 +00:00
Reid Spencer
10b9edbb69 For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore

llvm-svn: 29287
2006-07-26 16:18:00 +00:00
Reid Spencer
854aa3ca41 For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.

llvm-svn: 28719
2006-06-07 23:03:13 +00:00
Chris Lattner
3a18b19a03 Allow per-character control over what target assemblers allow in symbol
names.  This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names.  If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set.  This corresponds with what GAS accepts by default.

llvm-svn: 24291
2005-11-10 21:39:12 +00:00
Chris Lattner
2ba7f5a64d Add a new option for targets that accept quoted labels.
llvm-svn: 24283
2005-11-10 19:30:07 +00:00
Chris Lattner
6ce2a3d52e Remove M, which is dead. Eliminate a dead typedef. Add comments.
llvm-svn: 24282
2005-11-10 19:02:52 +00:00
Chris Lattner
5b0d543080 This method is no longer static
llvm-svn: 24280
2005-11-10 18:55:09 +00:00
Chris Lattner
4e377b5d6d minor interface changes.
llvm-svn: 24276
2005-11-10 18:46:57 +00:00
Chris Lattner
830b7b7f9a change proto slightly
llvm-svn: 23420
2005-09-24 08:23:53 +00:00
Misha Brukman
8018cc9e05 Remove trailing whitespace
llvm-svn: 21411
2005-04-21 20:48:15 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
43960d806a Allow an arbitrary prefix.
llvm-svn: 15864
2004-08-17 06:06:37 +00:00
Chris Lattner
c03416c90a Add a new method
llvm-svn: 14705
2004-07-08 22:09:07 +00:00
Chris Lattner
1bad051558 Add method
llvm-svn: 11425
2004-02-14 00:30:31 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
f918b0a5fc Add support to the mangler for targets which require _'s on global symbols
llvm-svn: 7741
2003-08-11 19:34:29 +00:00
Tanya Lattner
8a8e6e6ed3 Need to include <string> to fix compile error on Sun
llvm-svn: 7358
2003-07-28 16:42:33 +00:00
Brian Gaeke
2742a70083 Forward-declare class Module to make the header file self-contained.
llvm-svn: 7319
2003-07-25 20:20:53 +00:00
Brian Gaeke
d9979a5529 Cleanups:
Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator.
 Make Count an unsigned int, and use utostr().
 Don't name parameters things that start with underscore.
Mangler.h: All of the above, and also: Add Emacs mode-line.  Include <set>.

llvm-svn: 7301
2003-07-24 21:37:57 +00:00
Brian Gaeke
e5ae59ad05 Factor out name-mangling from X86/Printer, which is derived from CWriter,
into this new support class.

llvm-svn: 7300
2003-07-24 20:20:58 +00:00