code format

This commit is contained in:
vanhauser-thc
2024-11-19 16:25:50 +01:00
parent d11ade56e2
commit 82752fe38d
3 changed files with 11 additions and 5 deletions

View File

@ -23,6 +23,10 @@
#include "llvm/IR/CFG.h"
#endif
#include "llvm/IR/Constant.h"
#if LLVM_VERSION_MAJOR >= 20
#include "llvm/IR/Constants.h"
#include "llvm/IR/ValueSymbolTable.h"
#endif
#include "llvm/IR/DataLayout.h"
#if LLVM_VERSION_MAJOR < 15
#include "llvm/IR/DebugInfo.h"

View File

@ -10,9 +10,9 @@
#include <fstream>
#ifdef __has_include
#if __has_include(<optional>)
#include <optional>
#endif
#if __has_include(<optional>)
#include <optional>
#endif
#endif
#include <sys/time.h>

View File

@ -1717,12 +1717,14 @@ static u8 delete_files(u8 *path, u8 *prefix) {
if ((d_ent->d_name[0] != '.' &&
(!prefix || !strncmp(d_ent->d_name, prefix, strlen(prefix))))
/* heiko: don't forget the SHA1 files */
|| strspn(d_ent->d_name, "0123456789abcdef") == 2 * 20 /* TODO use 2 * HASH_LENGTH */
) {
|| strspn(d_ent->d_name, "0123456789abcdef") ==
2 * 20 /* TODO use 2 * HASH_LENGTH */
) {
u8 *fname = alloc_printf("%s/%s", path, d_ent->d_name);
if (unlink(fname)) { PFATAL("Unable to delete '%s'", fname); }
ck_free(fname);
}
}