]> granicus.if.org Git - llvm/commitdiff
Move DwarfGenerator.cpp to unittests
authorDaniel Jasper <djasper@google.com>
Thu, 8 Dec 2016 12:45:29 +0000 (12:45 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 8 Dec 2016 12:45:29 +0000 (12:45 +0000)
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.

Review: https://reviews.llvm.org/D27570

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289044 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CMakeLists.txt
unittests/DebugInfo/DWARF/CMakeLists.txt
unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
unittests/DebugInfo/DWARF/DwarfGenerator.cpp [moved from lib/CodeGen/DwarfGenerator.cpp with 98% similarity]
unittests/DebugInfo/DWARF/DwarfGenerator.h [moved from lib/CodeGen/DwarfGenerator.h with 97% similarity]

index 22ee8e9da0fa91fb26d97b77c2e5a0468704e6e3..398ea88363b64c232df4f67fade950bcd08d0562 100644 (file)
@@ -17,7 +17,6 @@ add_llvm_library(LLVMCodeGen
   DetectDeadLanes.cpp
   DFAPacketizer.cpp
   DwarfEHPrepare.cpp
-  DwarfGenerator.cpp
   EarlyIfConversion.cpp
   EdgeBundles.cpp
   ExecutionDepsFix.cpp
index b01a907fc1ec8e70fd84dc70cac92ed84a89cfce..cfebba02e7a0b7c75c58a5851ba6a5d99da86c82 100644 (file)
@@ -10,6 +10,7 @@ set(LLVM_LINK_COMPONENTS
   )
 
 set(DebugInfoSources
+  DwarfGenerator.cpp
   DWARFDebugInfoTest.cpp
   DWARFFormValueTest.cpp
   )
index 47709ff89ef6b8127da81dac059d3a049f062f00..f2a1a1459ee74946a78dfc3398ed9c9543e3a6d3 100644 (file)
@@ -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"
similarity index 98%
rename from lib/CodeGen/DwarfGenerator.cpp
rename to unittests/DebugInfo/DWARF/DwarfGenerator.cpp
index 1e8e661492136f3950269d49bffd177b4857041d..06fa121e7a2def8fbbf2561d7c20d6e2193c940d 100644 (file)
@@ -1,4 +1,4 @@
-//===--- lib/CodeGen/DwarfGenerator.cpp -------------------------*- C++ -*-===//
+//===--- unittests/DebugInfo/DWARF/DwarfGenerator.cpp -----------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#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"
similarity index 97%
rename from lib/CodeGen/DwarfGenerator.h
rename to unittests/DebugInfo/DWARF/DwarfGenerator.h
index 223e54b724b6ef88134e8aee0fef819d968659b6..245630e138defda1a0e2d7ec872821e6f5e72191 100644 (file)
@@ -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 @@ public:
 
 } // end namespace llvm
 
-#endif // LLVM_LIB_CODEGEN_ASMPRINTER_DWARFGENERATOR_H
+#endif // LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFGENERATOR_H