aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Mangler.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-09-18 16:57:42 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-09-18 16:57:42 +0000
commitc6f729ed5519cdf398ca4039dbdbea4f81433ec0 (patch)
tree869948d5bfd5d30bb4d55c7ee8a7a82b23d650f2 /lib/VMCore/Mangler.cpp
parent7de3bd273ec3f4f027089285106095e8700e226d (diff)
Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
variables to specified absolute address. Make use of this feature for MSP430. This unbreaks PR4776. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Mangler.cpp')
-rw-r--r--lib/VMCore/Mangler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index e0e224826d..a5fbf264c6 100644
--- a/lib/VMCore/Mangler.cpp
+++ b/lib/VMCore/Mangler.cpp
@@ -47,8 +47,9 @@ std::string Mangler::makeNameProper(const std::string &X,
++I; // Skip over the marker.
}
- // Mangle the first letter specially, don't allow numbers.
- if (*I >= '0' && *I <= '9')
+ // Mangle the first letter specially, don't allow numbers unless the target
+ // explicitly allows them.
+ if (!SymbolsCanStartWithDigit && *I >= '0' && *I <= '9')
Result += MangleLetter(*I++);
for (std::string::const_iterator E = X.end(); I != E; ++I) {