[llvm-diff] Create libLLVMDiff library

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
This commit is contained in:
Bill Wendling 2021-08-03 12:49:39 -07:00
parent 72d070b4db
commit 9854f2f30f
10 changed files with 31 additions and 5 deletions

View File

@ -6,10 +6,10 @@ set(LLVM_LINK_COMPONENTS
add_llvm_tool(llvm-diff add_llvm_tool(llvm-diff
llvm-diff.cpp llvm-diff.cpp
DiffConsumer.cpp
DiffLog.cpp
DifferenceEngine.cpp
DEPENDS DEPENDS
intrinsics_gen intrinsics_gen
) )
add_subdirectory(lib)
target_link_libraries(llvm-diff PRIVATE LLVMDiff)

View File

@ -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
)

View File

@ -10,8 +10,8 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "DiffLog.h" #include "lib/DiffLog.h"
#include "DifferenceEngine.h" #include "lib/DifferenceEngine.h"
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringRef.h"
#include "llvm/IR/LLVMContext.h" #include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"

View File

@ -0,0 +1,12 @@
set(LLVM_LINK_COMPONENTS
Core
IRReader
Support
)
add_llvm_tool(llvm-livepatch
llvm-livepatch.cpp
DEPENDS
intrinsics_gen
)