Rename "ir2obj-cache" to "cache" (source and filenames)

This commit is contained in:
Johan Engelen 2016-09-26 16:57:16 +02:00
parent e0c78fa198
commit 61e99e82d7
9 changed files with 17 additions and 17 deletions

View file

@ -327,11 +327,11 @@ file(GLOB_RECURSE IR_SRC_D ir/*.d)
file(GLOB IR_SRC ir/*.cpp) file(GLOB IR_SRC ir/*.cpp)
file(GLOB IR_HDR ir/*.h) file(GLOB IR_HDR ir/*.h)
set(DRV_SRC set(DRV_SRC
driver/cache.cpp
driver/cl_options.cpp driver/cl_options.cpp
driver/codegenerator.cpp driver/codegenerator.cpp
driver/configfile.cpp driver/configfile.cpp
driver/exe_path.cpp driver/exe_path.cpp
driver/ir2obj_cache.cpp
driver/targetmachine.cpp driver/targetmachine.cpp
driver/toobj.cpp driver/toobj.cpp
driver/tool.cpp driver/tool.cpp
@ -340,14 +340,14 @@ set(DRV_SRC
${CMAKE_BINARY_DIR}/driver/ldc-version.cpp ${CMAKE_BINARY_DIR}/driver/ldc-version.cpp
) )
set(DRV_HDR set(DRV_HDR
driver/linker.h driver/cache.h
driver/cache_pruning.h
driver/cl_options.h driver/cl_options.h
driver/codegenerator.h driver/codegenerator.h
driver/configfile.h driver/configfile.h
driver/exe_path.h driver/exe_path.h
driver/ir2obj_cache.h
driver/ir2obj_cache_pruning.h
driver/ldc-version.h driver/ldc-version.h
driver/linker.h
driver/targetmachine.h driver/targetmachine.h
driver/toobj.h driver/toobj.h
driver/tool.h driver/tool.h

View file

@ -1,4 +1,4 @@
//===-- driver/ir2obj_cache.cpp -------------------------------------------===// //===-- driver/cache.cpp --------------------------------------------------===//
// //
// LDC the LLVM D compiler // LDC the LLVM D compiler
// //
@ -27,12 +27,12 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "driver/ir2obj_cache.h" #include "driver/cache.h"
#include "ddmd/errors.h" #include "ddmd/errors.h"
#include "driver/cache_pruning.h"
#include "driver/cl_options.h" #include "driver/cl_options.h"
#include "driver/ldc-version.h" #include "driver/ldc-version.h"
#include "driver/ir2obj_cache_pruning.h"
#include "gen/logger.h" #include "gen/logger.h"
#include "gen/optimizer.h" #include "gen/optimizer.h"

View file

@ -1,4 +1,4 @@
//===-- driver/ir2obj_cache.h -----------------------------------*- C++ -*-===// //===-- driver/cache.h ------------------------------------------*- C++ -*-===//
// //
// LDC the LLVM D compiler // LDC the LLVM D compiler
// //

View file

@ -1,4 +1,4 @@
//===-- driver/ir2obj_cache_pruning.d -----------------------------*- D -*-===// //===-- driver/cache_pruning.d ------------------------------------*- D -*-===//
// //
// LDC the LLVM D compiler // LDC the LLVM D compiler
// //
@ -18,7 +18,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
module driver.ir2obj_cache_pruning; module driver.cache_pruning;
import std.file; import std.file;
import std.datetime: Clock, dur, Duration, SysTime; import std.datetime: Clock, dur, Duration, SysTime;
@ -104,7 +104,7 @@ struct CachePruner
if (!hasPruneIntervalPassed()) if (!hasPruneIntervalPassed())
return; 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" // E.g. "ircache_00a13b6f918d18f9f9de499fc661ec0d.o"
auto filePattern = "ircache_????????????????????????????????.{o,obj}"; auto filePattern = "ircache_????????????????????????????????.{o,obj}";
auto cacheFiles = dirEntries(cachePath, filePattern, SpanMode.shallow, /+ followSymlink +/ false); auto cacheFiles = dirEntries(cachePath, filePattern, SpanMode.shallow, /+ followSymlink +/ false);

View file

@ -1,4 +1,4 @@
//===-- driver/ir2obj_cache_pruning.h ---------------------------*- C++ -*-===// //===-- driver/cache_pruning.h ----------------------------------*- C++ -*-===//
// //
// LDC the LLVM D compiler // LDC the LLVM D compiler
// //

View file

@ -19,11 +19,11 @@
#include "root.h" #include "root.h"
#include "scope.h" #include "scope.h"
#include "ddmd/target.h" #include "ddmd/target.h"
#include "driver/cache.h"
#include "driver/cl_options.h" #include "driver/cl_options.h"
#include "driver/codegenerator.h" #include "driver/codegenerator.h"
#include "driver/configfile.h" #include "driver/configfile.h"
#include "driver/exe_path.h" #include "driver/exe_path.h"
#include "driver/ir2obj_cache.h"
#include "driver/ldc-version.h" #include "driver/ldc-version.h"
#include "driver/linker.h" #include "driver/linker.h"
#include "driver/targetmachine.h" #include "driver/targetmachine.h"

View file

@ -10,7 +10,7 @@
#include "driver/toobj.h" #include "driver/toobj.h"
#include "driver/cl_options.h" #include "driver/cl_options.h"
#include "driver/ir2obj_cache.h" #include "driver/cache.h"
#include "driver/targetmachine.h" #include "driver/targetmachine.h"
#include "driver/tool.h" #include "driver/tool.h"
#include "gen/irstate.h" #include "gen/irstate.h"

View file

@ -33,7 +33,7 @@ endfunction()
add_custom_target(${LDCPRUNECACHE_EXE} ALL DEPENDS ${LDCPRUNECACHE_EXE_FULL}) add_custom_target(${LDCPRUNECACHE_EXE} ALL DEPENDS ${LDCPRUNECACHE_EXE_FULL})
set(LDCPRUNECACHE_D_SRC set(LDCPRUNECACHE_D_SRC
${PROJECT_SOURCE_DIR}/tools/ldc-prune-cache.d ${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( build_d_tool(
"${LDCPRUNECACHE_EXE_FULL}" "${LDCPRUNECACHE_EXE_FULL}"

View file

@ -7,7 +7,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// //
// Prunes the ir2obj cache. // Prunes LDC's cache.
// //
// TODO: Let the commandline parameters accept units, e.g. // TODO: Let the commandline parameters accept units, e.g.
// `--interval=30m`, or `--max-bytes=5GB`. // `--interval=30m`, or `--max-bytes=5GB`.
@ -20,7 +20,7 @@ import std.stdio;
import std.getopt; import std.getopt;
import std.file: isDir; import std.file: isDir;
import driver.ir2obj_cache_pruning; import driver.cache_pruning;
// System exit codes: // System exit codes:
enum EX_OK = 0; enum EX_OK = 0;