Displaying 1 result from an estimated 1 matches for "noncnam".
Did you mean:
noncname
2017 Dec 12
3
File/module scope inline assembly
...DSL that uses non-C identifiers, but I want to write the implementation of the runtime support libraries for this DSL in C. The compiler is built using the LLVM v5.0.0 release branch.
To do this I thought I could simply write:
int foo() { return 42; } // The C implementation
asm(".alias nonCname foo"); // Make the non-C name be a synonym for the C implementation
If I compile with '-S -emit-llvm', the LL file contains:
module asm ".alias nonCname foo"
define i32 @foo() local_unnamed_addr #0 {
ret i32 42
}
That is, the inline-assembly precedes the function defin...