-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support 'raw mangles' via leading "\1" in pragma(mangle) strings
Such mangled names aren't affected by a target-specific default (C) prefix, such as `_` on Mac.
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Tests that 'raw mangles' starting with "\1" are correctly propagated to IR. | ||
|
||
// RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll | ||
|
||
// CHECK: @"\01myGlobal" = global i32 0 | ||
pragma(mangle, "\1myGlobal") | ||
__gshared int myGlobal; | ||
|
||
// CHECK: define void @"\01myFunction"() | ||
pragma(mangle, "\1myFunction") | ||
void myFunction() {} |