]> git.saurik.com Git - apple/ld64.git/blobdiff - ld64-134.9/unit-tests/test-cases/dwarf-debug-notes/other.cxx
ld64-134.9.tar.gz
[apple/ld64.git] / ld64-134.9 / unit-tests / test-cases / dwarf-debug-notes / other.cxx
diff --git a/ld64-134.9/unit-tests/test-cases/dwarf-debug-notes/other.cxx b/ld64-134.9/unit-tests/test-cases/dwarf-debug-notes/other.cxx
new file mode 100644 (file)
index 0000000..a6b403b
--- /dev/null
@@ -0,0 +1,27 @@
+
+#include "header.h"
+
+int uninit;
+int init = 1;
+static int custom __asm__(".my_non_standard_name") = 1;
+static int suninit;
+static int sinit=0;
+static int scustominit __asm__(".my_non_standard_name_static") = 1;
+
+int bar(int x)
+{
+       static int bar_uninit;
+       static int bar_init=3;
+       bar_uninit = x;
+       scustominit = x;
+       custom = x;
+       return 20 + suninit + sinit +
+               bar_init + bar_uninit + foo(x);
+}
+
+extern void disappear() __asm__("lbegone");
+void disappear() {}
+
+extern void foo() __asm__(".my_non_standard_function_name");
+void foo() { disappear(); }
+