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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    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@N@@3HA"
+// CHECK: @"\01?s1@N@@3PADA"
+// FIXME: @"\01?s2@N@@3QBDB"
+// NOW:   @"\01?s2@N@@3PBDA"
+// FIXME: @"\01?s3@N@@3QBDB"
+// NOW:   @"\01?s3@N@@3PBDA"
 // CHECK: @c
 // CHECK: @"\01?d@foo@@0FB"
 // CHECK: @"\01?e@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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to