aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
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
commit3789f872b0ac8f9d22d99696164e04b664af90f6 (patch)
tree869948d5bfd5d30bb4d55c7ee8a7a82b23d650f2 /include/llvm/Support
parent052e60d59a4f423089f1f088d0e1e7ac61bd5be7 (diff)
downloadexternal_llvm-3789f872b0ac8f9d22d99696164e04b664af90f6.zip
external_llvm-3789f872b0ac8f9d22d99696164e04b664af90f6.tar.gz
external_llvm-3789f872b0ac8f9d22d99696164e04b664af90f6.tar.bz2
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 'include/llvm/Support')
-rw-r--r--include/llvm/Support/Mangler.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h
index 23ea377..03c5648 100644
--- a/include/llvm/Support/Mangler.h
+++ b/include/llvm/Support/Mangler.h
@@ -51,6 +51,10 @@ private:
/// the space character. By default, this is false.
bool UseQuotes;
+ /// SymbolsCanStartWithDigit - If this is set, the target allows symbols to
+ /// start with digits (e.g., "0x0021"). By default, this is false.
+ bool SymbolsCanStartWithDigit;
+
/// 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.
@@ -75,9 +79,13 @@ public:
/// strings for assembler labels.
void setUseQuotes(bool Val) { UseQuotes = Val; }
+ /// setSymbolsCanStartWithDigit - If SymbolsCanStartWithDigit is set to true,
+ /// this target allows symbols to start with digits.
+ void setSymbolsCanStartWithDigit(bool Val) { SymbolsCanStartWithDigit = Val; }
+
/// Acceptable Characters - This allows the target to specify which characters
/// are acceptable to the assembler without being mangled. By default we
- /// allow letters, numbers, '_', '$', and '.', which is what GAS accepts.
+ /// allow letters, numbers, '_', '$', '.', which is what GAS accepts, and '@'.
void markCharAcceptable(unsigned char X) {
AcceptableChars[X/32] |= 1 << (X&31);
}