aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-10-18 20:46:28 +0000
committerHans Wennborg <hans@hanshq.net>2013-10-18 20:46:28 +0000
commit22f9dd4591e8af6d6feed10a4b6e11a784582edc (patch)
treec95ba0547f40c0a5129e40d5e7716867351767f7 /include
parent2d8a1d677c81c8e05d1dbc7832e1ced10cfc629a (diff)
downloadexternal_llvm-22f9dd4591e8af6d6feed10a4b6e11a784582edc.zip
external_llvm-22f9dd4591e8af6d6feed10a4b6e11a784582edc.tar.gz
external_llvm-22f9dd4591e8af6d6feed10a4b6e11a784582edc.tar.bz2
MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asm
This is another (final?) stab at making us able to parse our own asm output on Windows. Symbols on Windows often contain @'s and ?'s in their names. Our asm parser didn't like this. ?'s were not allowed, and @'s were intepreted as trying to reference PLT/GOT/etc. We can't just add quotes around the bad names, since e.g. for MinGW, we use gas to assemble, and it doesn't like quotes in some places (notably in .def directives). This commit makes us allow ?'s in symbol names, and @'s in symbol names for MS assembly. Differential Revision: http://llvm-reviews.chandlerc.com/D1978 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAsmInfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index c9cecc1..bcf6fe8 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -156,6 +156,10 @@ namespace llvm {
/// symbol names. This defaults to true.
bool AllowPeriodsInName;
+ /// \brief This is true if the assembler allows @ characters in symbol
+ /// names. Defaults to false.
+ bool AllowAtInName;
+
/// AllowUTF8 - This is true if the assembler accepts UTF-8 input.
// FIXME: Make this a more general encoding setting?
bool AllowUTF8;
@@ -485,6 +489,9 @@ namespace llvm {
bool doesAllowPeriodsInName() const {
return AllowPeriodsInName;
}
+ bool doesAllowAtInName() const {
+ return AllowAtInName;
+ }
bool doesAllowUTF8() const {
return AllowUTF8;
}