Skip to content

InternalizePass should consider built-in functions. #65965

Closed as not planned
Closed as not planned
@dianqk

Description

@dianqk

We should preserve built-in functions when running InternalizePass.

Similar to

AlwaysPreserved.insert("__stack_chk_fail");
if (Triple(M.getTargetTriple()).isOSAIX())
AlwaysPreserved.insert("__ssp_canary_word");
else
AlwaysPreserved.insert("__stack_chk_guard");
and
static const char *PreservedSymbols[] = {
#define HANDLE_LIBCALL(code, name) name,
#include "llvm/IR/RuntimeLibcalls.def"
#undef HANDLE_LIBCALL
// There are global variables, so put it here instead of in
// RuntimeLibcalls.def.
// TODO: Are there similar such variables?
"__ssp_canary_word",
"__stack_chk_guard",
};
.

Related issue: rust-lang/rust#113923.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions