1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
// Test for Github issue 1519
// Check that .mangleof strings do not contain any char 0x01.
// LDC may prepend 0x01 to prevent LLVM from modifying the symbol name, but it should not appear in user code.
// RUN: %ldc -c %s
extern (C) void fooC()
{
}
extern (C++) void fooCpp()
{
}
extern (D) void fooD()
{
}
void aliasTemplate(alias F)()
{
F();
}
void main()
{
import std.algorithm;
static assert(all!"a != '\1'"(fooC.mangleof));
static assert(all!"a != '\1'"(fooCpp.mangleof));
static assert(all!"a != '\1'"(fooD.mangleof));
static assert(all!"a != '\1'"(aliasTemplate!fooCpp.mangleof));
}
|