[PATCH] D21575: [LTO] Move UpdateCompilerUsed.h from lib/ to include/

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 17:11:35 PDT 2016


davide created this revision.
davide added reviewers: mehdi_amini, dexonsmith.
davide added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

I plan to use it in lld. Are you OK with moving this to include/ , or there's a particular reason why it should stay in lib/LTO?

Thanks!
 

http://reviews.llvm.org/D21575

Files:
  lib/LTO/LTOCodeGenerator.cpp
  lib/LTO/ThinLTOCodeGenerator.cpp
  lib/LTO/UpdateCompilerUsed.cpp
  lib/LTO/UpdateCompilerUsed.h

Index: lib/LTO/UpdateCompilerUsed.h
===================================================================
--- lib/LTO/UpdateCompilerUsed.h
+++ 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 <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
Index: lib/LTO/UpdateCompilerUsed.cpp
===================================================================
--- lib/LTO/UpdateCompilerUsed.cpp
+++ 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"
Index: lib/LTO/ThinLTOCodeGenerator.cpp
===================================================================
--- lib/LTO/ThinLTOCodeGenerator.cpp
+++ 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: lib/LTO/LTOCodeGenerator.cpp
===================================================================
--- lib/LTO/LTOCodeGenerator.cpp
+++ 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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21575.61464.patch
Type: text/x-patch
Size: 3058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160622/e183f815/attachment.bin>


More information about the llvm-commits mailing list