Skip to content

Commit f8c6515

Browse files
committed
[DWP] Refactoring llvm-dwp in to a library part 2
This is follow up to https://reviews.llvm.org/D106198 where llvm-dwp was refactored in to multiple files. In this patch moving them in to lib/include directories. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D106493
1 parent 7de73da commit f8c6515

File tree

9 files changed

+34
-20
lines changed

9 files changed

+34
-20
lines changed

llvm/tools/llvm-dwp/DWP.h renamed to llvm/include/llvm/DWP/DWP.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef LLVM_TOOLS_LLVM_DWP_DWP_H
2-
#define LLVM_TOOLS_LLVM_DWP_DWP_H
1+
#ifndef LLVM_DWP_DWP_H
2+
#define LLVM_DWP_DWP_H
33

44
#include "DWPStringPool.h"
55
#include "llvm/ADT/ArrayRef.h"
@@ -94,4 +94,4 @@ void writeIndex(MCStreamer &Out, MCSection *Section,
9494
uint32_t IndexVersion);
9595

9696
} // namespace llvm
97-
#endif // LLVM_TOOLS_LLVM_DWP_DWP_H
97+
#endif // LLVM_DWP_DWP_H

llvm/tools/llvm-dwp/DWPError.h renamed to llvm/include/llvm/DWP/DWPError.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TOOLS_LLVM_DWP_DWPERROR
2-
#define TOOLS_LLVM_DWP_DWPERROR
1+
#ifndef LLVM_DWP_DWPERROR_H
2+
#define LLVM_DWP_DWPERROR_H
33

44
#include "llvm/Support/Error.h"
55
#include "llvm/Support/ErrorHandling.h"
@@ -20,4 +20,4 @@ class DWPError : public ErrorInfo<DWPError> {
2020
};
2121
} // namespace llvm
2222

23-
#endif
23+
#endif // LLVM_DWP_DWPERROR_H

llvm/tools/llvm-dwp/DWPStringPool.h renamed to llvm/include/llvm/DWP/DWPStringPool.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TOOLS_LLVM_DWP_DWPSTRINGPOOL
2-
#define TOOLS_LLVM_DWP_DWPSTRINGPOOL
1+
#ifndef LLVM_DWP_DWPSTRINGPOOL_H
2+
#define LLVM_DWP_DWPSTRINGPOOL_H
33

44
#include "llvm/ADT/DenseMap.h"
55
#include "llvm/MC/MCSection.h"
@@ -53,4 +53,4 @@ class DWPStringPool {
5353
};
5454
} // namespace llvm
5555

56-
#endif
56+
#endif // LLVM_DWP_DWPSTRINGPOOL_H

llvm/lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_subdirectory(ObjectYAML)
2626
add_subdirectory(Option)
2727
add_subdirectory(Remarks)
2828
add_subdirectory(DebugInfo)
29+
add_subdirectory(DWP)
2930
add_subdirectory(ExecutionEngine)
3031
add_subdirectory(Target)
3132
add_subdirectory(AsmParser)

llvm/lib/DWP/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
add_llvm_component_library(LLVMDWP
2+
DWP.cpp
3+
DWPError.cpp
4+
5+
ADDITIONAL_HEADER_DIRS
6+
${LLVM_MAIN_INCLUDE_DIR}/llvm/DWP
7+
8+
DEPENDS
9+
intrinsics_gen
10+
11+
LINK_COMPONENTS
12+
DebugInfoDWARF
13+
MC
14+
Object
15+
Support
16+
Target
17+
)

llvm/tools/llvm-dwp/DWP.cpp renamed to llvm/lib/DWP/DWP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
// package files).
1111
//
1212
//===----------------------------------------------------------------------===//
13-
#include "DWP.h"
14-
#include "DWPError.h"
13+
#include "llvm/DWP/DWP.h"
14+
#include "llvm/DWP/DWPError.h"
1515
#include "llvm/MC/MCContext.h"
1616
#include "llvm/MC/MCObjectFileInfo.h"
1717
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#include "DWPError.h"
1+
#include "llvm/DWP/DWPError.h"
22
using namespace llvm;
33
char DWPError::ID;

llvm/tools/llvm-dwp/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
set(LLVM_LINK_COMPONENTS
2-
AllTargetsAsmParsers
32
AllTargetsCodeGens
43
AllTargetsDescs
54
AllTargetsInfos
6-
AsmPrinter
75
DebugInfoDWARF
6+
DWP
87
MC
98
Object
109
Support
11-
Target
1210
)
1311

1412
add_llvm_tool(llvm-dwp
1513
llvm-dwp.cpp
16-
DWP.cpp
17-
DWPError.cpp
1814

1915
DEPENDS
2016
intrinsics_gen

llvm/tools/llvm-dwp/llvm-dwp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// package files).
1111
//
1212
//===----------------------------------------------------------------------===//
13-
#include "DWP.h"
14-
#include "DWPError.h"
15-
#include "DWPStringPool.h"
13+
#include "llvm/DWP/DWP.h"
14+
#include "llvm/DWP/DWPError.h"
15+
#include "llvm/DWP/DWPStringPool.h"
1616
#include "llvm/MC/MCAsmBackend.h"
1717
#include "llvm/MC/MCAsmInfo.h"
1818
#include "llvm/MC/MCCodeEmitter.h"

0 commit comments

Comments
 (0)