[PATCH] D76185: [mlir] Add support for generating dialect declarations via tablegen.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 13:40:26 PDT 2020


rriddle added a comment.

In D76185#1925212 <https://reviews.llvm.org/D76185#1925212>, @NathanielMcVicar wrote:

> 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!


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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76185/new/

https://reviews.llvm.org/D76185





More information about the llvm-commits mailing list