0
0
mirror of https://github.com/llvm/llvm-project.git synced 2025-04-21 11:46:49 +00:00

[MLIR][NFC] fix msvc debug build errors ()

We found the build broken using msvc debug build as below:
```
C:\Users\bangtliu\iree\third_party\llvm-project\llvm\include\llvm/ADT/SmallVector.h(1162): error C2338: static_assert failed: 'You are trying to use a default number of inlined elements for `SmallVector<T>` but `sizeof(T)` is really big! Please use an explicit number of inlined elements with `SmallVector<T, N>` to make sure you really want that much inline storage.'
C:\Users\bangtliu\iree\third_party\llvm-project\llvm\include\llvm/ADT/SmallVector.h(1162): note: the template instantiation context (the oldest one first) is
C:\Users\bangtliu\iree\third_party\llvm-project\llvm\include\llvm/ADT/SmallVector.h(1194): note: see reference to class template instantiation 'llvm::CalculateSmallVectorDefaultInlinedElements<T>' being compiled
        with
        [
            T=`anonymous-namespace'::LinalgOperandDef
        ]
C:\Users\bangtliu\iree\third_party\llvm-project\mlir\tools\mlir-linalg-ods-gen\mlir-linalg-ods-yaml-gen.cpp(120): error C2976: 'llvm::SmallVector': too few template arguments
C:\Users\bangtliu\iree\third_party\llvm-project\llvm\include\llvm/ADT/SmallVector.h(1195): note: see declaration of 'llvm::SmallVector'
[862/7776] Building CXX object llvm-project\lib\DebugInfo\DWARF\CMakeFiles\LLVMDebugInfoDWARF.dir\DWARFDebugLine.cpp.obj
ninja: build stopped: subcommand failed.
```

This PR is added to address this error.
This commit is contained in:
Bangtian Liu 2025-03-14 21:36:53 -04:00 committed by GitHub
parent 5265412c13
commit d52ec1e9dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -117,9 +117,9 @@ struct ScalarAssign {
};
struct LinalgStructuredOpConfig {
SmallVector<LinalgOperandDef> args;
SmallVector<LinalgOperandDef, 4> args;
LinalgIndexingMapsConfig indexingMaps;
SmallVector<LinalgIteratorTypeDef> iteratorTypes;
SmallVector<LinalgIteratorTypeDef, 4> iteratorTypes;
std::vector<ScalarAssign> assignments;
};