1 //==------ UpdateCompilerUsed.h - LLVM Link Time Optimizer Utility --------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file declares a helper class to update llvm.compiler_used metadata.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LTO_UPDATE_COMPILER_USED_H
14 #define LLVM_LTO_UPDATE_COMPILER_USED_H
16 #include "llvm/ADT/StringSet.h"
17 #include "llvm/IR/GlobalValue.h"
23 /// Find all globals in \p TheModule that are referenced in
24 /// \p AsmUndefinedRefs, as well as the user-supplied functions definitions that
25 /// are also libcalls, and create or update the magic "llvm.compiler_used"
26 /// global in \p TheModule.
27 void updateCompilerUsed(Module
&TheModule
, const TargetMachine
&TM
,
28 const StringSet
<> &AsmUndefinedRefs
);
31 #endif // LLVM_LTO_UPDATE_COMPILER_USED_H