This generates the class declarations for dialects using the existing 'Dialect' tablegen classes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I think part of this change may have broken the Windows build. Sorry for not being able to be more specific or catching it sooner. I'll be more on top of this once the buildbot moves over to the loud master.
51.976 [2280/29/443] Building CXX object tools\mlir\lib\TableGen\CMakeFiles\LLVMMLIRTableGen.dir\Dialect.cpp.obj FAILED: tools/mlir/lib/TableGen/CMakeFiles/LLVMMLIRTableGen.dir/Dialect.cpp.obj C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe /nologo /TP -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=1 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\mlir\lib\TableGen -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\lib\TableGen -Iinclude -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\llvm\include -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include -Itools\mlir\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2 /EHs-c- /GR- -UNDEBUG -std:c++14 /showIncludes /Fotools\mlir\lib\TableGen\CMakeFiles\LLVMMLIRTableGen.dir\Dialect.cpp.obj /Fdtools\mlir\lib\TableGen\CMakeFiles\LLVMMLIRTableGen.dir\LLVMMLIRTableGen.pdb /FS -c E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\lib\TableGen\Dialect.cpp E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/TableGen/Dialect.h(36): error C2039: 'string': is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\memory(18): note: see declaration of 'std' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/TableGen/Dialect.h(36): error C3646: 'getCppClassName': unknown override specifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/TableGen/Dialect.h(36): error C2059: syntax error: '(' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/TableGen/Dialect.h(36): error C2238: unexpected token(s) preceding ';' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\lib\TableGen\Dialect.cpp(27): error C2039: 'getCppClassName': is not a member of 'mlir::tblgen::Dialect' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/TableGen/Dialect.h(25): note: see declaration of 'mlir::tblgen::Dialect' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\lib\TableGen\Dialect.cpp(27): error C2270: 'getCppClassName': modifiers not allowed on nonmember functions E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\lib\TableGen\Dialect.cpp(29): error C2065: 'def': undeclared
Comment Actions
No problem Nathaniel, thanks for the report! I think this is just a missing header of <string> in Dialect.h. I'm assuming this is due to differences in includes for the various STL libraries.
Comment Actions
That changed the error to following. In cases like this is better to move the discussion to the latest update, or keep it here? Thanks!
59.188 [2155/64/533] Building CXX object tools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-tblgen.dir\DialectGen.cpp.obj FAILED: tools/mlir/tools/mlir-tblgen/CMakeFiles/mlir-tblgen.dir/DialectGen.cpp.obj C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe /nologo /TP -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=1 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\mlir\tools\mlir-tblgen -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen -Iinclude -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\llvm\include -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include -Itools\mlir\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2 /EHs-c- /GR- -UNDEBUG -std:c++14 /showIncludes /Fotools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-tblgen.dir\DialectGen.cpp.obj /Fdtools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-tblgen.dir\ /FS -c E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(98): error C3539: a template-argument cannot be a type that contains 'auto' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2825: 'T': must be a class or namespace when followed by '::' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(99): note: see reference to class template instantiation 'mlir::FunctionTraits<int,false>' being compiled E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2510: 'T': left of '::' must be a class/struct/union E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2065: '()': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(382): error C2955: 'std::is_class': use of class template requires template argument list C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\type_traits(581): note: see declaration of 'std::is_class' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2955: 'mlir::FunctionTraits': use of class template requires template argument list E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): note: see declaration of 'mlir::FunctionTraits' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(98): error C2039: 'result_t': is not a member of 'mlir::FunctionTraits<int,false>' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(98): note: see declaration of 'mlir::FunctionTraits<int,false>' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(99): error C2061: syntax error: identifier 'result_t' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(104): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(108): error C2065: 'dialectAttrs': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(109): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(110): error C2065: 'dialectTypes': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(111): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(115): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(117): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(120): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(153): error C2660: 'emitDialectDecl': function does not take 4 arguments E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(96): note: see declaration of 'emitDialectDecl'
Comment Actions
Keeping it here is fine.
59.188 [2155/64/533] Building CXX object tools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-tblgen.dir\DialectGen.cpp.obj FAILED: tools/mlir/tools/mlir-tblgen/CMakeFiles/mlir-tblgen.dir/DialectGen.cpp.obj C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe /nologo /TP -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=1 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\mlir\tools\mlir-tblgen -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen -Iinclude -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\llvm\include -IE:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include -Itools\mlir\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2 /EHs-c- /GR- -UNDEBUG -std:c++14 /showIncludes /Fotools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-tblgen.dir\DialectGen.cpp.obj /Fdtools\mlir\tools\mlir-tblgen\CMakeFiles\mlir-tblgen.dir\ /FS -c E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(98): error C3539: a template-argument cannot be a type that contains 'auto' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2825: 'T': must be a class or namespace when followed by '::' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(99): note: see reference to class template instantiation 'mlir::FunctionTraits<int,false>' being compiled E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2510: 'T': left of '::' must be a class/struct/union E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2065: '()': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(382): error C2955: 'std::is_class': use of class template requires template argument list C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\type_traits(581): note: see declaration of 'std::is_class' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): error C2955: 'mlir::FunctionTraits': use of class template requires template argument list E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\include\mlir/Support/STLExtras.h(383): note: see declaration of 'mlir::FunctionTraits' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(98): error C2039: 'result_t': is not a member of 'mlir::FunctionTraits<int,false>' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(98): note: see declaration of 'mlir::FunctionTraits<int,false>' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(99): error C2061: syntax error: identifier 'result_t' E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(104): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(108): error C2065: 'dialectAttrs': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(109): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(110): error C2065: 'dialectTypes': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(111): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(115): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(117): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(120): error C2065: 'os': undeclared identifier E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(153): error C2660: 'emitDialectDecl': function does not take 4 arguments E:\build_slave\mlir-x64-windows-ninja\llvm-project\mlir\tools\mlir-tblgen\DialectGen.cpp(96): note: see declaration of 'emitDialectDecl'
Ah yes, I've encountered this bug in MSVC before. It is annoying. I'll rework that section to avoid it.