Before 925471ed903dad871042d7ed0bab89ab6566a564 remove_directories
supports path with slash (instead of backslash).
The ILCreateFromPathW in new implementation requires backslash path,
so the call to remove_directories will fail if the path contains slash.
This is to normalize the path to make sure remove_directories still
support path with slash as well.
Use variadic args with DEBUG_WITH_TYPE("name", ...) macros to resolve a
compilation failure that occurs when using a comma within the last macro
argument. Commas come up when instantiating templates such as
SmallMapVector that require multiple template args.
Nested sequences could be defined but the YAML output was incorrect.
`Output::newLineCheck()` was not able to emit multiple dashes `- ` and
YAML parser sometimes didn't accept its output as the result.
This fixes for emitting corresponding dashes for consecutive
`inSeqFirstElement`, but suppresses emission to the top
`inSeqFirstElement`.
This also fixes for emitting flow elements onto nested sequences.
`std::array` will be handled like `MutableArrayRef`;
- Extending elements is not acceptable.
- For applying fewer sequence, trailing elements will be initialized by
default.
Not like;
- `std::array` is not the reference but holds values. Supposing to hold
small count of elements.
Changes since llvmorg-20-init-12117-g941f704f0892:
- Use `size_t` for `N`, instead of `unsigned`.
- include <array>
`std::array` will be handled like `MutableArrayRef`;
- Extending elements is not acceptable.
- For applying fewer sequence, trailing elements will be initialized by
default.
Not like;
- `std::array` is not the reference but holds values. Supposing to hold
small count of elements.
Changes are:
1) Make signed-overflow detection optimal
2) For signed-overflow, try to rule out direction even if we can't
totally rule out overflow.
3) Intersect add/sub assuming no overflow with possible overflow
clamping values as opposed to add/sub without the assumption.
Clients can now pass multiple parent classes to RTTIExtends. Each parent
class will be inherited from publicly (and non-virtually). The isa,
cast, and dyn_cast methods will now work as expected for types with
multiple inheritance.
Line ending policies were changed in the parent, dccebddb3b80. To make
it easier to resolve downstream merge conflicts after line-ending
policies are adjusted this is a separate whitespace-only commit. If you
have merge conflicts as a result, you can simply `git add --renormalize
-u && git merge --continue` or `git add --renormalize -u && git rebase
--continue` - depending on your workflow.
Adopt scaled indent in PredicateExpander.
Added pre/post inc/dec operators to `indent` and related unit tests.
Verified by comparing *.inc files generated by LLVM build with/without
the change.
Scaled indent is useful when indentation is always in steps of a fixed
number (the Scale) and still allow using the +/- operators to adjust
indentation.
This makes unit tests compatible with the assertion added in
https://github.com/llvm/llvm-project/pull/106524, by setting the
isSigned flag to the correct value or changing how the value is
constructed.
This patch adds an IsText parameter to the following functions
openFileForRead, getBufferForFile, getBufferForFileImpl and determines
whether a file is text by querying the file tag on z/OS. The default is
set to OF_Text instead of OF_None, this change in value does not affect
any other platforms other than z/OS.
Fix bugs found when actually trying to use formatv() automatic index
assignment in IntrinsicEmitter.cpp:
- Assign automatic index only for `ReplacementType::Format`.
- Make the check for all replacement indices being either automatic orexplicit more accurate.
The existing check fails for formatv("{}{0}{}", 0, 1) (added as a unit test). Explicitly track if we
have seen any explicit and any automatic index instead.
raw_string_ostream::flush() is essentially a no-op (also specified in docs).
Don't call it in tests that aren't meant to test 'raw_string_ostream' itself.
p.s. remove a few redundant calls to raw_string_ostream::str()
Make index in replacement field optional. It will be automatically
assigned in incremental order by formatv.
Make mixed use of automatic and explicit indices an error that will fail
validation.
Adopt uses of formatv() within FormatVariadic to use automatic index.
Building with -DLLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off should not
prevent the PluginsTests and DynamicLibraryTests unit tests from working.
This fix uses the approach implemented in
https://github.com/llvm/llvm-project/pull/101741.
rdar://135849875
LLVM-based tools often use the `llvm::vfs::FileSystem` instrastructure
to access the file system. This patch adds new kind of a VFS that
performs lightweight tracing of file system operations on an underlying
VFS. This is supposed to aid in investigating file system traffic
without resorting to instrumentation on the operating system level.
There will be follow-up patches that integrate this into Clang and its
dependency scanner.
- Rename `Align` field in ReplacementItem/FmtAlign to `Width` to
accurately reflect its use.
- Change both `Width` and `Index` in ReplacementItem to 32-bit int
instead of size_t (as 64-bits seems excessive in this context).
- Eliminate the use of `Empty` ReplacementType, and use the
existing std::optional<> instead to indicate that.
- Eliminate some boilerplate type code in formatv().
- Eliminate the loop in `splitLiteralAndReplacement`. The existing
code will never loop back.
- Directly use constructor instead of std::make_pair.
- The subtest, if enabled correctly, will fail with assert in Debug
builds and validation is disabled in Release builds.
- Hence deleting the test to fix test failures in CI.
Change formatv() to validate that the number of arguments passed matches
number of replacement fields in the format string, and that the replacement
indices do not contain holes.
To support cases where this cannot be guaranteed, introduce a formatv()
overload that allows disabling validation with a bool flag as its first argument.
Follow up on 5627794 (MathExtras: avoid unnecessarily widening types) to
change the overflow behavior of alignToPowerOf2 to only overflow if the
result is not representable in the return type. This allows us to
template'ize it, and avoid unnecessarily widening the types of
arguments.
Reland #102671 after the other attempted fixes are all flawed in some
build configurations. The previous try for the same commit was breaking
a flaky tests under ASAN which is not marked as unsupported. This fix
should be good to go now.
Fixes AIX bot for DynamicLibraryTests failure.
This reverts commit a9604cd3212beb6cdb41a79f248723140ab9939d.
The export list in unit-tests will break sanitizer build since that
requires more symbols than listed in the export file.