Clang doesn’t support a use of “this” pointer inside inline asm.
When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer.
Clang returns with an error.
This patch fixes that.
error: expected unqualified-id
For example:
struct A {
void f() {
__asm mov eax, this
// error: expected unqualified-id
}
};
I think FileCheck will insist that this is spelled without a space before the colon.
It would also be better to test that %this.addr is used as an argument to an asm blob, something like this:
// CHECK: call void asm sideeffect {{.*}}%this.addr