Index: llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h =================================================================== --- llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h +++ llvm/trunk/include/llvm/LTO/UpdateCompilerUsed.h @@ -0,0 +1,34 @@ +//==------ 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 + +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 Index: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp =================================================================== --- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp +++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp @@ -13,8 +13,8 @@ //===----------------------------------------------------------------------===// #include "llvm/LTO/LTOCodeGenerator.h" +#include "llvm/LTO/UpdateCompilerUsed.h" -#include "UpdateCompilerUsed.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/Passes.h" Index: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp =================================================================== --- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp +++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp @@ -13,12 +13,12 @@ //===----------------------------------------------------------------------===// #include "llvm/LTO/ThinLTOCodeGenerator.h" +#include "llvm/LTO/UpdateCompilerUsed.h" #ifdef HAVE_LLVM_REVISION #include "LLVMLTORevision.h" #endif -#include "UpdateCompilerUsed.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/ModuleSummaryAnalysis.h" Index: llvm/trunk/lib/LTO/UpdateCompilerUsed.h =================================================================== --- llvm/trunk/lib/LTO/UpdateCompilerUsed.h +++ llvm/trunk/lib/LTO/UpdateCompilerUsed.h @@ -1,34 +0,0 @@ -//==------ 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 - -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 Index: llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp =================================================================== --- llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp +++ llvm/trunk/lib/LTO/UpdateCompilerUsed.cpp @@ -11,11 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "UpdateCompilerUsed.h" - #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Mangler.h" +#include "llvm/LTO/UpdateCompilerUsed.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Transforms/IPO/Internalize.h"