mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-09 05:31:19 +00:00
31ce1f6172
It is now only doing the update to the llvm.compiler_used global. The client has to call separately the internalization stage. Hopefully the code is simpler to understand this way. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266174 91177308-0d34-0410-b5e6-96231b3b80d8
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
//==------ UpdateCompilerUsed.h - LLVM Link Time Optimizer Utility --------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares a helper class to update llvm.compiler_used metadata.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LTO_UPDATE_COMPILER_USED_H
|
|
#define LLVM_LTO_UPDATE_COMPILER_USED_H
|
|
|
|
#include "llvm/ADT/StringSet.h"
|
|
#include "llvm/IR/GlobalValue.h"
|
|
|
|
#include <functional>
|
|
|
|
namespace llvm {
|
|
class Module;
|
|
class TargetMachine;
|
|
|
|
/// Find all globals in \p TheModule that are referenced in
|
|
/// \p AsmUndefinedRefs, as well as the user-supplied functions definitions that
|
|
/// are also libcalls, and create or update the magic "llvm.compiler_used"
|
|
/// global in \p TheModule.
|
|
void UpdateCompilerUsed(Module &TheModule, const TargetMachine &TM,
|
|
const StringSet<> &AsmUndefinedRefs);
|
|
}
|
|
|
|
#endif // LLVM_LTO_LTOINTERNALIZE_H
|