Age | Commit message (Collapse) | Author | Files | Lines |
|
They are already implicitly convertible to the underlying type, but that
doesn't work in some contexts, and it can be useful to get the
underlying value without needing the remember/guess the right type.
I converted a couple of call sites to demonstrate usefulness, but
there's likely more of them. I know at least of at least a few in LLDB,
but I don't want to make this a cross-project patch.
|
|
.. produced by ADT/BitmaskEnum.h.
These aren't implicitly convertible to an integer, so I needed to tweak
a couple of bitwise operations and add an explicit constructor for
HexNumber and FlagEntry.
Motivation: I'd like to use this in the SFrame data structures (#147264)
|
|
This is motivated by the [SFrame format](https://discourse.llvm.org/t/rfc-adding-sframe-support-to-llvm/86900),
which contains several signed fields.
Having explicit signed operations makes the parsing code read better and
avoids potential surprises if e.g. a "signed" uint8_t value is converted
ta greater width.
|
|
Use llvm::fill instead of std::fill
|
|
Disallow calls to templated `getTrailingObjects` if there is a single
trailing type (strict mode). Add `getTrailingObjectsNonStrict` for cases
when it's not possible to know statically if there will be a single or
multiple trailing types (like in OpenMPClause.h) to bypass the struct
checks.
This will ensure that future users of TrailingObjects class do not
accidently use the templated `getTrailingObjects` when they have a
single trailing type.
|
|
This patch transforms:
X && *X == Y
to:
X == Y
where X is of std::optional<T>, and Y is of T or similar.
|
|
ArrayRef now has a new constructor that takes a parameter whose type
has data() and size(). This patch migrates:
ArrayRef<T>(X.data(), X.size()
to:
ArrayRef<T>(X)
|
|
None of the constructors touched in this patch has a corresponding
definition. This patch explicitly deletes them with "= delete" while
moving them to the public section of respective classes. Note that "=
delete" itself serves as documentation.
Identified with modernize-use-equals-delete.
|
|
This patch transforms:
X && *X == Y
to:
X == Y
where X is of std::optional<T>, and Y is of T or similar.
|
|
(FileIdx, LineNo). (#141540)
Accoring to the discussion in https://github.com/llvm/llvm-project/pull/140529, we need to SSCL can be created from multiple ignore list files, so we can repeat-fsanitize-ignorelist=. The change is necessary to achieve the feature described in https://github.com/llvm/llvm-project/issues/139128.
|
|
Issue #139128 needs to find the last one in the file.
Pull Request: https://github.com/llvm/llvm-project/pull/141697
|
|
|
|
(#141057)
A few files of llvm dir had duplicate headers included. This patch
removes those redundancies.
---------
Co-authored-by: Akash Agrawal <akashag@qti.qualcomm.com>
|
|
This patch adds a wrapper class called EncodingConverter for
ConverterEBCDIC. This class is then extended to support the ICU library
or iconv library. The ICU library currently takes priority over the
iconv library.
Relevant RFCs:
https://discourse.llvm.org/t/rfc-adding-a-charset-converter-to-the-llvm-support-library/69795
https://discourse.llvm.org/t/rfc-enabling-fexec-charset-support-to-llvm-and-clang-reposting/71512
Stacked PR to enable fexec-charset that depends on this:
https://github.com/llvm/llvm-project/pull/138895
See old PR for review and commit history:
https://github.com/llvm/llvm-project/pull/74516
|
|
`F_no_mmap` introduced by https://reviews.llvm.org/D69294 is misnamed.
It oughts to be `F_mmap`
When the output is a regular file or do not exist,
`--no-mmap-output-file` is the default. Relands #134787 by fixing the
lld option default. Note: changing the default to --map-output-file
would likely fail on llvm-clang-x86_64-sie-win
(https://lab.llvm.org/buildbot/#/builders/46/builds/14847)
Pull Request: https://github.com/llvm/llvm-project/pull/139836
|
|
- Use private inheritance for TrailingObjects as recommended in
TrailingObjects.h
- No need to define `numTrailingObjects` for the last trailing type.
- Fix comment typos.
|
|
VersionTuple::withMajorReplaced (#139318)
The expectation of this API is that it only changes the major version of
a preexisting version tuple. However, it was adding 0's, which caused
unintended changes in serialization or printing.
Instead, check for the existence of the non-major parts of the tuple.
|
|
Add a specialization of getTrailingObjects() for a single trailing type.
This is a common case and with the specialization you don't need to
specify the single trailing type redundantly. Also add an overload for
getTrailingObjects which takes size and returns an
ArryaRef/MutableArrayRef as that's a common use case as well.
|
|
Add `llvm::uninitialized_copy` that accepts a range instead of start/end
iterator for the source of the copy.
|
|
|
|
|
|
On our buildbot https://lab.llvm.org/buildbot/#/builders/122/builds/1478,
one of the new tests added by https://github.com/llvm/llvm-project/pull/136046
failed.
This is because on non-Apple Silicon platforms, the implementation
is to start a new thread, but when threading is disabled this is the
same as calling a function normally.
|
|
to get more stack space (#136046)
Reland https://github.com/llvm/llvm-project/pull/133173
Clang spawns a new thread to avoid running out of stack space. This can
make debugging and performance analysis more difficult as how the
threads are connected is difficult to recover.
This patch introduces `runOnNewStack` and applies it in Clang. On
platforms that have good support for it this allocates a new stack and
moves to it using assembly. Doing split stacks like this actually runs
on most platforms, but many debuggers and unwinders reject the large or
backwards stack offsets that occur. Apple platforms and tools are known
to support this, so this only enables it there for now.
|
|
|
|
InstructionCost is already an optional value, containing an Invalid
state that can be checked with isValid(). There is little point in
returning another optional from getValue(). Most uses do not make use of
it being a std::optional, dereferencing the value directly (either
isValid has been checked previously or the Cost is assumed to be valid).
The one case that does in AMDGPU used value_or which has been replaced
by a isValid() check.
|
|
(#136121)
…Stream.
CachedFileStream has previously performed the commit step in its
destructor, but this means its only recourse for error handling is
report_fatal_error. Modify this to add an explicit commit() method, and
call this in the appropriate places with appropriate error handling for
the location.
Currently the destructor of CacheStream gives an assert failure in Debug
builds if commit() was not called. This will help track down any
remaining uses of the API that assume the old destructior behaviour. In
Release builds we fall back to the previous behaviour and call
report_fatal_error if the commit fails.
This is version 2 of this PR, superseding reverted PR
https://github.com/llvm/llvm-project/pull/115331 . I have incorporated a
change to the testcase to make it more reliable on Windows, as well as
two follow-up changes
(https://github.com/llvm/llvm-project/commit/df79000896101acc9b8d7435e59f767b36c00ac8
and
https://github.com/llvm/llvm-project/commit/b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1)
that were also reverted when 115331 was reverted.
---------
Co-authored-by: Augie Fackler <augie@google.com>
Co-authored-by: Vitaly Buka <vitalybuka@google.com>
|
|
This makes `llvm::interleaved` useable with ostream types that define
custom stream operators that print in a different format from
`raw_ostream`. For example, MLIR's OpAsmPrinter prints values as
operands:
https://github.com/llvm/llvm-project/blob/6c5f50f18694a4d91d7ce53a14188c54ee7c6f3b/mlir/include/mlir/IR/OpImplementation.h#L534-L552
|
|
Add two new format functions for printing ranges: `interleaved` and
`interleaved_array`.
This is meant to improve the ergonomics of printing ranges. Before this
patch, we have to either use `llvm::interleave` or write a for loop by
hand. For example:
Before:
```c++
ArrayRef<Type> types = ...;
ArrayRef<Values> values = ...;
LLVM_DEBUG({
llvm::dbgs() << "Types: ";
llvm::interleave_comma(llvm::dbgs(), types);
llvm::dbgs() << "\n";
llvm::dbgs() << "Values: [";
llvm::interleave_comma(llvm::dbgs(), values);
llvm::dbgs() << "]\n";
}):
```
After:
```c++
ArrayRef<Type> types = ...;
ArrayRef<Values> values = ...;
LLVM_DEBUG(llvm::dbgs() << "Types: " << interleaved(types) << "\n");
LLVM_DEBUG(llvm::dbgs() << "Values: " << interleaved_array(values) << "\n");
```
The separator and the prefix/suffix strings are customizable.
|
|
(#135865)
…thread to get more stack space (#133173)"
This change breaks the Clang build on Mac AArch64.
This reverts commit d0c973a7a0149db3b71767d4c5a20a31e6a8ed5b. This
reverts commit 429a84f8a4bf559f43f50072747ef49d3e3b2cf1. This reverts
commit 4f64c80d5a23c244f942193e58ecac666c173308.
|
|
more stack space (#133173)
Clang spawns a new thread to avoid running out of stack space. This can
make debugging and performance analysis more difficult as how the
threads are connected is difficult to recover.
This patch introduces `runOnNewStack` and applies it in Clang. On
platforms that have good support for it this allocates a new stack and
moves to it using assembly. Doing split stacks like this actually runs
on most platforms, but many debuggers and unwinders reject the large or
backwards stack offsets that occur. Apple platforms and tools are known
to support this, so this only enables it there for now.
|
|
Reverts llvm/llvm-project#134787
Causes the LIT test `lld\test\ELF\link-open-file.test` to fail on the
`llvm-clang-x86_64-sie-win` Build Bot. First instance of the failure
observed in: https://lab.llvm.org/buildbot/#/builders/46/builds/14847
|
|
The `F_no_mmap` flag was introduced by
https://github.com/llvm/llvm-project/commit/68142324290f2932df0e271747cdccc371d6dded
|
|
After outputting block scalar string, the indent will be wrong.
This patch fixes Padding after block scalar string to ensure the correct
format of yaml.
The new added ut will fail in main.
```diff
@@ -3,4 +3,4 @@
Just a block
scalar doc
-scalar: a
+ scalar: a
...\n
```
|
|
This reverts commit 64779455b8f4875c7de690dd4c3e324dbbcb3029.
|
|
This reverts commit cb4ae35de0b4c19149379f16c7b279d80a669f9d.
That commit broke compilation with GCC:
../unittests/Support/YAMLIOTest.cpp:1280:20: error: explicit specialization of
template<class T> struct llvm::yaml::MappingTraits’ outside its namespace must u
se a nested-name-specifier [-fpermissive]
1280 | template <> struct MappingTraits<V> {
| ^~~~~~~~~~~~~~~~
|
|
|
|
The last version of this patch had memory leaks due to using the
BumpPtrAllocator for data types that required destructors to run to
release heap memory (e.g. via std::vector and std::string). This version
avoids that by using smart pointers, and dropping support for
BumpPtrAllocator.
We should refactor this code to use the BumpPtrAllocator again, but that
can be addressed in future patches, since those are more invasive
changes that need to refactor many of the core data types to avoid
owning allocations.
Adds Support for the Mustache Templating Language. See specs here:
https://mustache.github.io/mustache.5.html This patch implements
support+tests for majority of the features of the language including:
- Variables
- Comments
- Lambdas
- Sections
This meant as a library to support places where we have to generate
HTML, such as in clang-doc.
Co-authored-by: Peter Chou <peter.chou@mail.utoronto.ca>
|
|
This broke:
https://lab.llvm.org/buildbot/#/builders/64/builds/2486
https://lab.llvm.org/buildbot/#/builders/146/builds/2476
|
|
(#131026)
Only print them on TimerGroup destruction (or eagerly when
TimerGroup::printAll() is called).
We should be able to destroy all Timers in a TimerGroup while delaying
printing the stored TimeRecords.
|
|
Reapply https://github.com/llvm/llvm-project/pull/130732
Fixes errors which broke build bot that uses GCC as a compiler
https://lab.llvm.org/buildbot/#/builders/66/builds/11049
GCC threw an warning due to an issue std::move with a temporary object
which prevents copy elision. Fixes the issue by removing the std::move
Adds Support for the Mustache Templating Language. See specs here:
https://mustache.github.io/mustache.5.html
This patch implements support+tests for majority of the features of the
language including:
- Variables
- Comments
- Lambdas
- Sections
This meant as a library to support places where we have to generate
HTML, such as in clang-doc.
|
|
This patch caused certain GCC buildbots to failed
errors: https://lab.llvm.org/buildbot/#/builders/66/builds/11049
|
|
Reapply https://github.com/llvm/llvm-project/pull/105893
Fixes errors which broke build bot that uses GCC as a compiler
https://lab.llvm.org/buildbot/#/builders/136/builds/3100
The issue here was that using Accessor defined in the anonymous
namespace introduces Accessor as a type alias. Which is, later redeclare
as members in classes Token and ASTNode with the same name which causes
error in GCC. The patch fixes it by renaming the Accesor to
AccessorValue. It also fixes warnings caused by the compile due to
initialization
Adds Support for the Mustache Templating Language. See specs here:
https://mustache.github.io/mustache.5.html
This patch implements support+tests for majority of the features of the
language including:
- Variables
- Comments
- Lambdas
- Sections
This meant as a library to support places where we have to generate
HTML, such as in clang-doc.
|
|
This patch removes some internal state out of `LockFileManager` by
moving the locking code from the constructor into new member function
`tryLock()` which returns the errors right away. This simplifies and
modernizes the interface.
|
|
This broke some build bot warnings
https://lab.llvm.org/buildbot/#/builders/160/builds/14381/steps/5/logs/stdio
reverts: https://github.com/llvm/llvm-project/pull/105893
|
|
Adds Support for the Mustache Templating Language. See specs here:
https://mustache.github.io/mustache.5.html
This patch implements support+tests for majority of the features of the
language including:
- Variables
- Comments
- Lambdas
- Sections
This meant as a library to support places where we have to generate
HTML, such as in clang-doc.
|
|
ELFAtributeParser and add support for AArch64 Build Attributes (#128727)
Refactor readobj to integrate AArch64 Build Attributes under
ELFAttributeParser. ELFAttributeParser now serves as a base class for:
- ELFCompactAttrParser, handling Arm-style attributes with a single
build attribute subsection.
- ELFExtendedAttrParser, handling AArch64-style attributes with multiple
build attribute subsections. This improves code organization and better
aligns with the attribute parsing model.
Add support for parsing AArch64 Build Attributes.
|
|
CachedFile… (#115331)"
This reverts commit ce9e1d3c15ed6290f1cb07b482939976fa8115cd.
The unittest added in this commit seems to be flaky causing random failure on buildbots:
- https://lab.llvm.org/buildbot/#/builders/46/builds/13235
- https://lab.llvm.org/buildbot/#/builders/46/builds/13232
- https://lab.llvm.org/buildbot/#/builders/46/builds/13228
- https://lab.llvm.org/buildbot/#/builders/46/builds/13224
- https://lab.llvm.org/buildbot/#/builders/46/builds/13220
- https://lab.llvm.org/buildbot/#/builders/46/builds/13210
- https://lab.llvm.org/buildbot/#/builders/46/builds/13208
- https://lab.llvm.org/buildbot/#/builders/46/builds/13207
- https://lab.llvm.org/buildbot/#/builders/46/builds/13202
- https://lab.llvm.org/buildbot/#/builders/46/builds/13196
and
- https://lab.llvm.org/buildbot/#/builders/180/builds/14266
- https://lab.llvm.org/buildbot/#/builders/180/builds/14254
- https://lab.llvm.org/buildbot/#/builders/180/builds/14250
- https://lab.llvm.org/buildbot/#/builders/180/builds/14245
- https://lab.llvm.org/buildbot/#/builders/180/builds/14244
- https://lab.llvm.org/buildbot/#/builders/180/builds/14226
|
|
(#115331)
…Stream.
CachedFileStream has previously performed the commit step in its
destructor, but this means its only recourse for error handling is
report_fatal_error. Modify this to add an explicit commit() method, and
call this in the appropriate places with appropriate error handling for
the location.
Currently the destructor of CacheStream gives an assert failure in Debug
builds if commit() was not called. This will help track down any
remaining uses of the API that assume the old destructior behaviour. In
Release builds we fall back to the previous behaviour and call
report_fatal_error if the commit fails.
|
|
|
|
|