mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
Rename "ir2obj-cache" to "cache" (source and filenames)
This commit is contained in:
parent
e0c78fa198
commit
61e99e82d7
9 changed files with 17 additions and 17 deletions
|
@ -327,11 +327,11 @@ file(GLOB_RECURSE IR_SRC_D ir/*.d)
|
|||
file(GLOB IR_SRC ir/*.cpp)
|
||||
file(GLOB IR_HDR ir/*.h)
|
||||
set(DRV_SRC
|
||||
driver/cache.cpp
|
||||
driver/cl_options.cpp
|
||||
driver/codegenerator.cpp
|
||||
driver/configfile.cpp
|
||||
driver/exe_path.cpp
|
||||
driver/ir2obj_cache.cpp
|
||||
driver/targetmachine.cpp
|
||||
driver/toobj.cpp
|
||||
driver/tool.cpp
|
||||
|
@ -340,14 +340,14 @@ set(DRV_SRC
|
|||
${CMAKE_BINARY_DIR}/driver/ldc-version.cpp
|
||||
)
|
||||
set(DRV_HDR
|
||||
driver/linker.h
|
||||
driver/cache.h
|
||||
driver/cache_pruning.h
|
||||
driver/cl_options.h
|
||||
driver/codegenerator.h
|
||||
driver/configfile.h
|
||||
driver/exe_path.h
|
||||
driver/ir2obj_cache.h
|
||||
driver/ir2obj_cache_pruning.h
|
||||
driver/ldc-version.h
|
||||
driver/linker.h
|
||||
driver/targetmachine.h
|
||||
driver/toobj.h
|
||||
driver/tool.h
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//===-- driver/ir2obj_cache.cpp -------------------------------------------===//
|
||||
//===-- driver/cache.cpp --------------------------------------------------===//
|
||||
//
|
||||
// LDC – the LLVM D compiler
|
||||
//
|
||||
|
@ -27,12 +27,12 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "driver/ir2obj_cache.h"
|
||||
#include "driver/cache.h"
|
||||
|
||||
#include "ddmd/errors.h"
|
||||
#include "driver/cache_pruning.h"
|
||||
#include "driver/cl_options.h"
|
||||
#include "driver/ldc-version.h"
|
||||
#include "driver/ir2obj_cache_pruning.h"
|
||||
#include "gen/logger.h"
|
||||
#include "gen/optimizer.h"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
//===-- driver/ir2obj_cache.h -----------------------------------*- C++ -*-===//
|
||||
//===-- driver/cache.h ------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// LDC – the LLVM D compiler
|
||||
//
|
|
@ -1,4 +1,4 @@
|
|||
//===-- driver/ir2obj_cache_pruning.d -----------------------------*- D -*-===//
|
||||
//===-- driver/cache_pruning.d ------------------------------------*- D -*-===//
|
||||
//
|
||||
// LDC – the LLVM D compiler
|
||||
//
|
||||
|
@ -18,7 +18,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
module driver.ir2obj_cache_pruning;
|
||||
module driver.cache_pruning;
|
||||
|
||||
import std.file;
|
||||
import std.datetime: Clock, dur, Duration, SysTime;
|
||||
|
@ -104,7 +104,7 @@ struct CachePruner
|
|||
if (!hasPruneIntervalPassed())
|
||||
return;
|
||||
|
||||
// Only delete files that match ir2obj cache file naming.
|
||||
// Only delete files that match LDC's cache file naming.
|
||||
// E.g. "ircache_00a13b6f918d18f9f9de499fc661ec0d.o"
|
||||
auto filePattern = "ircache_????????????????????????????????.{o,obj}";
|
||||
auto cacheFiles = dirEntries(cachePath, filePattern, SpanMode.shallow, /+ followSymlink +/ false);
|
|
@ -1,4 +1,4 @@
|
|||
//===-- driver/ir2obj_cache_pruning.h ---------------------------*- C++ -*-===//
|
||||
//===-- driver/cache_pruning.h ----------------------------------*- C++ -*-===//
|
||||
//
|
||||
// LDC – the LLVM D compiler
|
||||
//
|
|
@ -19,11 +19,11 @@
|
|||
#include "root.h"
|
||||
#include "scope.h"
|
||||
#include "ddmd/target.h"
|
||||
#include "driver/cache.h"
|
||||
#include "driver/cl_options.h"
|
||||
#include "driver/codegenerator.h"
|
||||
#include "driver/configfile.h"
|
||||
#include "driver/exe_path.h"
|
||||
#include "driver/ir2obj_cache.h"
|
||||
#include "driver/ldc-version.h"
|
||||
#include "driver/linker.h"
|
||||
#include "driver/targetmachine.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "driver/toobj.h"
|
||||
|
||||
#include "driver/cl_options.h"
|
||||
#include "driver/ir2obj_cache.h"
|
||||
#include "driver/cache.h"
|
||||
#include "driver/targetmachine.h"
|
||||
#include "driver/tool.h"
|
||||
#include "gen/irstate.h"
|
||||
|
|
|
@ -33,7 +33,7 @@ endfunction()
|
|||
add_custom_target(${LDCPRUNECACHE_EXE} ALL DEPENDS ${LDCPRUNECACHE_EXE_FULL})
|
||||
set(LDCPRUNECACHE_D_SRC
|
||||
${PROJECT_SOURCE_DIR}/tools/ldc-prune-cache.d
|
||||
${PROJECT_SOURCE_DIR}/driver/ir2obj_cache_pruning.d
|
||||
${PROJECT_SOURCE_DIR}/driver/cache_pruning.d
|
||||
)
|
||||
build_d_tool(
|
||||
"${LDCPRUNECACHE_EXE_FULL}"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Prunes the ir2obj cache.
|
||||
// Prunes LDC's cache.
|
||||
//
|
||||
// TODO: Let the commandline parameters accept units, e.g.
|
||||
// `--interval=30m`, or `--max-bytes=5GB`.
|
||||
|
@ -20,7 +20,7 @@ import std.stdio;
|
|||
import std.getopt;
|
||||
import std.file: isDir;
|
||||
|
||||
import driver.ir2obj_cache_pruning;
|
||||
import driver.cache_pruning;
|
||||
|
||||
// System exit codes:
|
||||
enum EX_OK = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue