diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-14 00:01:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-14 00:01:06 +0000 |
commit | 59ecdfbee3aaf1ed48e8ddf0a660044fa8a93729 (patch) | |
tree | c0c1a0d03fd20221236b5882b43f9fd3e03e20cf /include | |
parent | 385396221bc244d6592a60133c55874ff57571ac (diff) | |
download | llvm-59ecdfbee3aaf1ed48e8ddf0a660044fa8a93729.tar.gz llvm-59ecdfbee3aaf1ed48e8ddf0a660044fa8a93729.tar.bz2 llvm-59ecdfbee3aaf1ed48e8ddf0a660044fa8a93729.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Mangler.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index 33ed102002..27d137ace5 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -42,13 +42,15 @@ class Mangler { /// from names with 'asm' specifiers. bool PreserveAsmNames; - /// Memo - This is used to remember the name that we assign a value. + /// AnonGlobalIDs - We need to give global values the same name every time + /// they are mangled. This keeps track of the number we give to anonymous + /// ones. /// - DenseMap<const Value*, std::string> Memo; + DenseMap<const GlobalValue*, unsigned> AnonGlobalIDs; - /// Count - This simple counter is used to unique value names. + /// NextAnonGlobalID - This simple counter is used to unique value names. /// - unsigned Count; + unsigned NextAnonGlobalID; /// AcceptableChars - This bitfield contains a one for each character that is /// allowed to be part of an unmangled name. |