Skip to content

Commit f8b263e

Browse files
committed
[cheriot] Do not treat setjmp/longjmp builtins as cherilibcallcc.
1 parent fbe4855 commit f8b263e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11856,10 +11856,11 @@ QualType ASTContext::GetBuiltinType(unsigned Id,
1185611856
"'.' should only occur at end of builtin type list!");
1185711857

1185811858
bool Variadic = (TypeStr[0] == '.');
11859-
11859+
bool IsCheriLibcall = Id != Builtin::BIsetjmp && Id != Builtin::BIlongjmp;
11860+
IsCheriLibcall &= Target->getTargetOpts().ABI != "cheriot-baremetal";
1186011861
FunctionType::ExtInfo EI(getDefaultCallingConvention(
1186111862
Variadic, /*IsCXXMethod=*/false, /*IsBuiltin=*/true,
11862-
/*IsLibcall*/ Target->getTargetOpts().ABI != "cheriot-baremetal"));
11863+
/*IsLibcall*/ IsCheriLibcall));
1186311864
if (BuiltinInfo.isNoReturn(Id)) EI = EI.withNoReturn(true);
1186411865

1186511866

0 commit comments

Comments
 (0)