[PATCH] D27570: Move DwarfGenerator.cpp to unittests

Daniel Jasper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 04:02:30 PST 2016


djasper created this revision.
djasper added a reviewer: bkramer.
djasper added a subscriber: llvm-commits.
Herald added a subscriber: mgorny.

So far it creates a test helper and so it should be moved there. It also create a layering cycle between CodeGen and CodeGen/AsmPrinter, which should be avoided.


https://reviews.llvm.org/D27570

Files:
  lib/CodeGen/CMakeLists.txt
  unittests/DebugInfo/DWARF/CMakeLists.txt
  unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
  unittests/DebugInfo/DWARF/DwarfGenerator.cpp
  unittests/DebugInfo/DWARF/DwarfGenerator.h


Index: unittests/DebugInfo/DWARF/DwarfGenerator.h
===================================================================
--- unittests/DebugInfo/DWARF/DwarfGenerator.h
+++ unittests/DebugInfo/DWARF/DwarfGenerator.h
@@ -1,4 +1,4 @@
-//===--- lib/CodeGen/DwarfGenerator.h ---------------------------*- C++ -*-===//
+//===--- unittests/DebugInfo/DWARF/DwarfGenerator.h -------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFGENERATOR_H
-#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFGENERATOR_H
+#ifndef LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFGENERATOR_H
+#define LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFGENERATOR_H
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/CodeGen/DIE.h"
@@ -228,4 +228,4 @@
 
 } // end namespace llvm
 
-#endif // LLVM_LIB_CODEGEN_ASMPRINTER_DWARFGENERATOR_H
+#endif // LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFGENERATOR_H
Index: unittests/DebugInfo/DWARF/DwarfGenerator.cpp
===================================================================
--- unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -1,14 +1,14 @@
-//===--- lib/CodeGen/DwarfGenerator.cpp -------------------------*- C++ -*-===//
+//===--- unittests/DebugInfo/DWARF/DwarfGenerator.cpp -----------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 
+#include "../lib/CodeGen/AsmPrinter/DwarfStringPool.h"
 #include "DwarfGenerator.h"
-#include "AsmPrinter/DwarfStringPool.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/CodeGen/DIE.h"
Index: unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
===================================================================
--- unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "../lib/CodeGen/DwarfGenerator.h"
+#include "DwarfGenerator.h"
 #include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h"
Index: unittests/DebugInfo/DWARF/CMakeLists.txt
===================================================================
--- unittests/DebugInfo/DWARF/CMakeLists.txt
+++ unittests/DebugInfo/DWARF/CMakeLists.txt
@@ -10,6 +10,7 @@
   )
 
 set(DebugInfoSources
+  DwarfGenerator.cpp
   DWARFDebugInfoTest.cpp
   DWARFFormValueTest.cpp
   )
Index: lib/CodeGen/CMakeLists.txt
===================================================================
--- lib/CodeGen/CMakeLists.txt
+++ lib/CodeGen/CMakeLists.txt
@@ -17,7 +17,6 @@
   DetectDeadLanes.cpp
   DFAPacketizer.cpp
   DwarfEHPrepare.cpp
-  DwarfGenerator.cpp
   EarlyIfConversion.cpp
   EdgeBundles.cpp
   ExecutionDepsFix.cpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27570.80742.patch
Type: text/x-patch
Size: 3156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161208/9b5d5ab9/attachment.bin>


More information about the llvm-commits mailing list