llvm::updateCompilerUsed

Create or update the magic "llvm.compiler_used" global in a module.

Synopsis

Declared in <llvm/LTO/legacy/UpdateCompilerUsed.h>

void
updateCompilerUsed(
    Module& TheModule,
    TargetMachine const& TM,
    StringSet<> const& AsmUndefinedRefs);

Description

Find all globals in TheModule that are referenced in AsmUndefinedRefs, as well as the user-supplied functions definitions that are also libcalls, and create or update the magic "llvm.compiler_used" global in TheModule.

Parameters

NameDescription
TheModuleModule whose llvm.compiler_used global is created or updated.
TMTarget machine used to identify libcalls and mangle symbol names.
AsmUndefinedRefsSet of mangled symbol names referenced from assembly.