File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ message(STATUS "LLVM_INCLUDE_DIRS: ${LLVM_INCLUDE_DIRS}")
3131message (STATUS "LLVM_DEFINITIONS: ${LLVM_DEFINITIONS_LIST} " )
3232
3333
34- add_library (LLVM INTERFACE )
35- target_include_directories (LLVM INTERFACE ${LLVM_INCLUDE_DIRS} )
34+ add_library (RiftLLVM INTERFACE )
35+ target_include_directories (RiftLLVM INTERFACE ${LLVM_INCLUDE_DIRS} )
3636llvm_map_components_to_libnames (llvm_libs core x86asmparser x86codegen )
37- target_link_libraries (LLVM INTERFACE ${LLVM_AVAILABLE_LIBS} )
38- target_compile_definitions (LLVM INTERFACE ${LLVM_DEFINITIONS_LIST} -DNOMINMAX )
37+ target_link_libraries (RiftLLVM INTERFACE ${LLVM_AVAILABLE_LIBS} )
38+ target_compile_definitions (RiftLLVM INTERFACE ${LLVM_DEFINITIONS_LIST} -DNOMINMAX )
3939# rift_target_disable_all_warnings(LLVM INTERFACE)
4040
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ rift_target_shared_output_directory(RiftBackendLLVM)
1212
1313target_link_libraries (RiftBackendLLVM PUBLIC Rift::Rift )
1414
15- target_link_libraries (RiftBackendLLVM PRIVATE LLVM )
15+ target_link_libraries (RiftBackendLLVM PRIVATE RiftLLVM )
1616
1717
1818install (TARGETS RiftBackendLLVM
Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ namespace Rift::AST
464464
465465
466466 public:
467- TPool (AST::Tree& ast) : Pool(ast, DeletionPolicy::Swap ) {}
467+ TPool (AST::Tree& ast) : Pool(ast, DeletionPolicy::InPlace ) {}
468468 ~TPool () override
469469 {
470470 Reset ();
Original file line number Diff line number Diff line change @@ -126,5 +126,5 @@ namespace Rift::AST
126126
127127constexpr bool IsNone (Rift::AST::Id id)
128128{
129- return id == Rift::AST::NoId;
129+ return Rift::AST::GetVersion (id) == Rift::AST::GetVersion (Rift::AST:: NoId) ;
130130}
Original file line number Diff line number Diff line change @@ -186,7 +186,16 @@ namespace Rift::AST
186186 pools.RemoveAtSwap (smallestIdx);
187187
188188 ids.Empty (false );
189- ids.Append (iterablePool->begin (), iterablePool->end ());
189+ ids.Reserve (iterablePool->Size ());
190+ for (AST::Id id : *iterablePool)
191+ {
192+ if (!IsNone (id)) [[likely]]
193+ {
194+ ids.Add (id);
195+ }
196+ }
197+ // Faster but doesnt exclude invalid ids. TODO: Improve PoolSet
198+ // ids.Append(iterablePool->begin(), iterablePool->end());
190199
191200 for (const Pool* pool : pools)
192201 {
You can’t perform that action at this time.
0 commit comments