mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -82,10 +82,17 @@ public:
|
||||
return (AcceptableChars[X/32] & (1 << (X&31))) != 0;
|
||||
}
|
||||
|
||||
/// getValueName - Returns the mangled name of V, an LLVM Value,
|
||||
/// in the current module.
|
||||
/// getMangledName - Returns the mangled name of V, an LLVM Value,
|
||||
/// in the current module. If 'Suffix' is specified, the name ends with the
|
||||
/// specified suffix. If 'ForcePrivate' is specified, the label is specified
|
||||
/// to have a private label prefix.
|
||||
///
|
||||
std::string getValueName(const GlobalValue *V, const char *Suffix = "");
|
||||
std::string getMangledName(const GlobalValue *V, const char *Suffix = "",
|
||||
bool ForcePrivate = false);
|
||||
|
||||
std::string getValueName(const GlobalValue *V, const char *Suffix = "") {
|
||||
return getMangledName(V, Suffix);
|
||||
}
|
||||
|
||||
/// makeNameProper - We don't want identifier names with ., space, or
|
||||
/// - in them, so we mangle these characters into the strings "d_",
|
||||
|
Reference in New Issue
Block a user