mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-05-20 14:06:10 +00:00

This CL 1. Creates Utils/ directory under lib/Target/WebAssembly 2. Moves existing WebAssemblyUtilities.cpp|h into the Utils/ directory 3. Creates Utils/WebAssemblyTypeUtilities.cpp|h and put type declarataions and type conversion functions scattered in various places into this single place. It has been suggested several times that it is not easy to share utility functions between subdirectories (AsmParser, DIsassembler, MCTargetDesc, ...). Sometimes we ended up [[ https://reviews.llvm.org/D92840#2478863 | duplicating ]] the same function because of this. There are already other targets doing this: AArch64, AMDGPU, and ARM have Utils/ subdirectory under their target directory. This extracts the utility functions into a single directory Utils/ and make them sharable among all passes in WebAssembly/ and its subdirectories. Also I believe gathering all type-related conversion functionalities into a single place makes it more usable. (Actually I was working on another CL that uses various type conversion functions scattered in multiple places, which became the motivation for this CL.) Reviewed By: dschuff, aardappel Differential Revision: https://reviews.llvm.org/D100995
14 lines
195 B
CMake
14 lines
195 B
CMake
add_llvm_component_library(LLVMWebAssemblyUtils
|
|
WebAssemblyUtilities.cpp
|
|
WebAssemblyTypeUtilities.cpp
|
|
|
|
LINK_COMPONENTS
|
|
CodeGen
|
|
Core
|
|
MC
|
|
Support
|
|
|
|
ADD_TO_COMPONENT
|
|
WebAssembly
|
|
)
|