Files
clang-p2996/clang/test/CodeGen/asm-call-func.c
Jason Liu fe177a1773 Fix assertion when passing function into inline asm's input operand
This seem to be a regression caused by this change:
https://reviews.llvm.org/D60943.
Since we delayed report the error, we would run into some invalid
state in clang and llvm.

Without this fix, clang would assert when passing function into
inline asm's input operand.

Differential Revision: https://reviews.llvm.org/D107941
2021-08-27 13:39:41 -04:00

8 lines
254 B
C

// RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu| FileCheck %s
void callee(void);
void caller() {
//CHECK: call void asm sideeffect "rcall $0", "n,~{dirflag},~{fpsr},~{flags}"(void ()* @callee)
asm("rcall %0" ::"n"(callee));
}