summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2018-02-07 01:55:08 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2018-02-07 01:55:08 +0000
commit58340526d3e23c9ee385966f9b10f12cb879331a (patch)
tree867920878845d75c134e9ecc4f3787b17e09d23a /clang/lib/AST
parentfd4db5331e512d23d2d1c832065acbe226e7616d (diff)
downloadbcm5719-llvm-58340526d3e23c9ee385966f9b10f12cb879331a.tar.gz
bcm5719-llvm-58340526d3e23c9ee385966f9b10f12cb879331a.zip
AST: support SwiftCC on MS ABI
Microsoft has reserved the identifier 'S' as the swift calling convention. Decorate the symbols appropriately. This enables swift on Windows. llvm-svn: 324439
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 9b395a7a11c..ec7d5c117aa 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -950,11 +950,10 @@ void MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
}
}
+// <postfix> ::= <unqualified-name> [<postfix>]
+// ::= <substitution> [<postfix>]
void MicrosoftCXXNameMangler::mangleNestedName(const NamedDecl *ND) {
- // <postfix> ::= <unqualified-name> [<postfix>]
- // ::= <substitution> [<postfix>]
const DeclContext *DC = getEffectiveDeclContext(ND);
-
while (!DC->isTranslationUnit()) {
if (isa<TagDecl>(ND) || isa<VarDecl>(ND)) {
unsigned Disc;
@@ -2136,6 +2135,7 @@ void MicrosoftCXXNameMangler::mangleCallingConvention(CallingConv CC) {
case CC_X86StdCall: Out << 'G'; break;
case CC_X86FastCall: Out << 'I'; break;
case CC_X86VectorCall: Out << 'Q'; break;
+ case CC_Swift: Out << 'S'; break;
case CC_X86RegCall: Out << 'w'; break;
}
}
OpenPOWER on IntegriCloud