[LLVMbugs] [Bug 13182] New: [Windows] const arrays are not mangled properly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 22 15:42:34 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13182
Bug #: 13182
Summary: [Windows] const arrays are not mangled properly
Product: clang
Version: unspecified
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: timurrrr at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Here's a test presented as a diff to test/CodeGenCXX/mangle-ms.cpp
the FIXME lines are the unsatisfied checks, NOW is how these variables are
mangled today.
diff --git test/CodeGenCXX/mangle-ms.cpp test/CodeGenCXX/mangle-ms.cpp
index 8798a7d..8440d68 100644
--- test/CodeGenCXX/mangle-ms.cpp
+++ test/CodeGenCXX/mangle-ms.cpp
@@ -2,6 +2,11 @@
// CHECK: @"\01?a@@3HA"
// CHECK: @"\01?b at N@@3HA"
+// CHECK: @"\01?s1 at N@@3PADA"
+// FIXME: @"\01?s2 at N@@3QBDB"
+// NOW: @"\01?s2 at N@@3PBDA"
+// FIXME: @"\01?s3 at N@@3QBDB"
+// NOW: @"\01?s3 at N@@3PBDA"
// CHECK: @c
// CHECK: @"\01?d at foo@@0FB"
// CHECK: @"\01?e at foo@@1JC"
@@ -18,10 +23,17 @@
int a;
-namespace N { int b; }
+namespace N {
+ int b;
+ extern char s1[];
+ extern const char s2[];
+ extern const char s3[42];
+}
static int c;
-int _c(void) {return c;}
+int _c(void) {
+ return N::s1[0] + N::s2[0] + N::s3[0] + c;
+}
// CHECK: @"\01?_c@@YAHXZ"
class foo {
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list