Skip to content

Commit 89b7a72

Browse files
committed
update
1 parent c6d573b commit 89b7a72

4 files changed

Lines changed: 27 additions & 13 deletions

File tree

llvm/lib/IR/Function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ using ProfileCount = Function::ProfileCount;
6262
template class llvm::SymbolTableListTraits<BasicBlock>;
6363

6464
static cl::opt<int> NonGlobalValueMaxNameSize(
65-
"non-global-value-max-name-size", cl::Hidden, cl::init(1024),
65+
"non-global-value-max-name-size", cl::Hidden, cl::init(16384),
6666
cl::desc("Maximum size for the name of non-global values."));
6767

6868
extern cl::opt<bool> UseNewDbgInfoFormat;

llvm/lib/IR/ValueSymbolTable.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ ValueName *ValueSymbolTable::makeUniqueName(Value *V,
6666

6767
// Retry if MaxNameSize has been exceeded.
6868
if (MaxNameSize > -1 && UniqueName.size() > (size_t)MaxNameSize) {
69-
assert(BaseSize >= UniqueName.size() - (size_t)MaxNameSize &&
70-
"Can't generate unique name: MaxNameSize is too small.");
71-
BaseSize -= UniqueName.size() - (size_t)MaxNameSize;
69+
size_t Overflow = UniqueName.size() - (size_t)MaxNameSize;
70+
if (BaseSize > Overflow) {
71+
BaseSize -= Overflow;
72+
} else {
73+
BaseSize = 1;
74+
}
7275
continue;
7376
}
7477
// Try insert the vmap entry with this suffix.

llvm/lib/Support/Unix/Path.inc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,18 @@ static std::error_code fillStatus(int StatRet, const struct stat &Status,
730730
}
731731

732732
uint32_t atime_nsec, mtime_nsec;
733+
#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) && \
734+
HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
733735
atime_nsec = Status.st_atim.tv_nsec;
734736
mtime_nsec = Status.st_mtim.tv_nsec;
737+
#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) && \
738+
HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
739+
atime_nsec = Status.st_atimespec.tv_nsec;
740+
mtime_nsec = Status.st_mtimespec.tv_nsec;
741+
#else
742+
atime_nsec = 0;
743+
mtime_nsec = 0;
744+
#endif
735745

736746
perms Perms = static_cast<perms>(Status.st_mode) & all_perms;
737747
Result = file_status(typeForMode(Status.st_mode), Perms, Status.st_dev,

mlir/utils/vscode/package-lock.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)