Skip to content

Commit

Permalink
[llvm-diff] Create libLLVMDiff library
Browse files Browse the repository at this point in the history
Some tools may want to use the LLVM "diff" code. Move the code into a
library for easy use.

No functionality change intende.

Differential Revision: https://reviews.llvm.org/D107392
  • Loading branch information
isanbard committed Aug 5, 2021
1 parent 72d070b commit 9854f2f
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 5 deletions.
6 changes: 3 additions & 3 deletions llvm/tools/llvm-diff/CMakeLists.txt
Expand Up @@ -6,10 +6,10 @@ set(LLVM_LINK_COMPONENTS

add_llvm_tool(llvm-diff
llvm-diff.cpp
DiffConsumer.cpp
DiffLog.cpp
DifferenceEngine.cpp

DEPENDS
intrinsics_gen
)

add_subdirectory(lib)
target_link_libraries(llvm-diff PRIVATE LLVMDiff)
14 changes: 14 additions & 0 deletions llvm/tools/llvm-diff/lib/CMakeLists.txt
@@ -0,0 +1,14 @@
set(LLVM_LINK_COMPONENTS
Core
Support
)

add_llvm_library(LLVMDiff
STATIC
DiffConsumer.cpp
DiffConsumer.h
DifferenceEngine.cpp
DifferenceEngine.h
DiffLog.cpp
DiffLog.h
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions llvm/tools/llvm-diff/llvm-diff.cpp
Expand Up @@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//

#include "DiffLog.h"
#include "DifferenceEngine.h"
#include "lib/DiffLog.h"
#include "lib/DifferenceEngine.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
Expand Down
12 changes: 12 additions & 0 deletions llvm/tools/llvm-livepatch/CMakeLists.txt
@@ -0,0 +1,12 @@
set(LLVM_LINK_COMPONENTS
Core
IRReader
Support
)

add_llvm_tool(llvm-livepatch
llvm-livepatch.cpp

DEPENDS
intrinsics_gen
)

0 comments on commit 9854f2f

Please sign in to comment.