[PATCH] D35773: Move llvm/Support/TargetRegistry.h to llvm/include/llvm/MC.

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 23 05:56:26 PDT 2017


chapuni created this revision.
Herald added subscribers: hiraditya, mgorny.

TargetRegistry isn't in proper layer. I think MC is better place.
Note, I have patchset to rename includes.


Repository:
  rL LLVM

https://reviews.llvm.org/D35773

Files:
  llvm/include/llvm/MC/TargetRegistry.h
  llvm/include/llvm/Support/TargetRegistry.h
  llvm/include/llvm/module.modulemap
  llvm/lib/MC/CMakeLists.txt
  llvm/lib/MC/TargetRegistry.cpp
  llvm/lib/Support/CMakeLists.txt
  llvm/lib/Support/TargetRegistry.cpp


Index: llvm/lib/Support/CMakeLists.txt
===================================================================
--- llvm/lib/Support/CMakeLists.txt
+++ llvm/lib/Support/CMakeLists.txt
@@ -137,7 +137,6 @@
   Program.cpp
   RWMutex.cpp
   Signals.cpp
-  TargetRegistry.cpp
   ThreadLocal.cpp
   Threading.cpp
   Valgrind.cpp
Index: llvm/lib/MC/TargetRegistry.cpp
===================================================================
--- llvm/lib/MC/TargetRegistry.cpp
+++ llvm/lib/MC/TargetRegistry.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Support/TargetRegistry.h"
+#include "llvm/MC/TargetRegistry.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/raw_ostream.h"
Index: llvm/lib/MC/CMakeLists.txt
===================================================================
--- llvm/lib/MC/CMakeLists.txt
+++ llvm/lib/MC/CMakeLists.txt
@@ -50,6 +50,7 @@
   MachObjectWriter.cpp
   StringTableBuilder.cpp
   SubtargetFeature.cpp
+  TargetRegistry.cpp
   WasmObjectWriter.cpp
   WinCOFFObjectWriter.cpp
 
Index: llvm/include/llvm/module.modulemap
===================================================================
--- llvm/include/llvm/module.modulemap
+++ llvm/include/llvm/module.modulemap
@@ -223,12 +223,6 @@
 module LLVM_MC {
   requires cplusplus
 
-  // FIXME: Mislayered?
-  module Support_TargetRegistry {
-    header "Support/TargetRegistry.h"
-    export *
-  }
-
   umbrella "MC"
   module * { export * }
 
Index: llvm/include/llvm/MC/TargetRegistry.h
===================================================================
--- llvm/include/llvm/MC/TargetRegistry.h
+++ llvm/include/llvm/MC/TargetRegistry.h
@@ -1,4 +1,4 @@
-//===- Support/TargetRegistry.h - Target Registration -----------*- C++ -*-===//
+//===- MC/TargetRegistry.h - Target Registration ----------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -16,8 +16,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_SUPPORT_TARGETREGISTRY_H
-#define LLVM_SUPPORT_TARGETREGISTRY_H
+#ifndef LLVM_MC_TARGETREGISTRY_H
+#define LLVM_MC_TARGETREGISTRY_H
 
 #include "llvm-c/Disassembler.h"
 #include "llvm/ADT/Optional.h"
@@ -1173,4 +1173,4 @@
 
 } // end namespace llvm
 
-#endif // LLVM_SUPPORT_TARGETREGISTRY_H
+#endif // LLVM_MC_TARGETREGISTRY_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35773.107823.patch
Type: text/x-patch
Size: 2418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170723/a766b311/attachment.bin>


More information about the llvm-commits mailing list