r331299 - Fix bogus MSVC char8_t mangling.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue May 1 11:50:16 PDT 2018
Author: rsmith
Date: Tue May 1 11:50:15 2018
New Revision: 331299
URL: http://llvm.org/viewvc/llvm-project?rev=331299&view=rev
Log:
Fix bogus MSVC char8_t mangling.
This appears to have been caused by a bad automatic svn merge with r330225
attaching the 'case' label to the wrong block of code. :(
Modified:
cfe/trunk/lib/AST/MicrosoftMangle.cpp
cfe/trunk/test/CodeGenCXX/char8_t.cpp
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=331299&r1=331298&r2=331299&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Tue May 1 11:50:15 2018
@@ -1918,7 +1918,6 @@ void MicrosoftCXXNameMangler::mangleType
Out << "$$T";
break;
- case BuiltinType::Char8:
case BuiltinType::Float16:
mangleArtificalTagType(TTK_Struct, "_Float16", {"__clang"});
break;
@@ -1927,6 +1926,7 @@ void MicrosoftCXXNameMangler::mangleType
mangleArtificalTagType(TTK_Struct, "_Half", {"__clang"});
break;
+ case BuiltinType::Char8:
case BuiltinType::Float128: {
DiagnosticsEngine &Diags = Context.getDiags();
unsigned DiagID = Diags.getCustomDiagID(
Modified: cfe/trunk/test/CodeGenCXX/char8_t.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/char8_t.cpp?rev=331299&r1=331298&r2=331299&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/char8_t.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/char8_t.cpp Tue May 1 11:50:15 2018
@@ -1,7 +1,8 @@
// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-windows %s -o - -verify
// CHECK: define void @_Z1fDu(
-void f(char8_t c) {}
+void f(char8_t c) {} // expected-error {{cannot mangle this built-in char8_t type yet}}
// CHECK: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE
template<typename T> void g(decltype(T() + u8"foo" + u8'r')) {}
More information about the cfe-commits
mailing list