HomePhabricator

[mlir] On Windows, silence warning on functions definition

Authored by aganea on Mar 27 2020, 9:24 AM.

Description

[mlir] On Windows, silence warning on functions definition

This fixes a number of warnings, where a function is re-defined after it is tagged as "being imported":

D:\llvm-project\mlir\lib\ExecutionEngine\CRunnerUtils.cpp(24,17): warning: 'print_i32' redeclared without 'dllimport' attribute: 'dllexport' attribute added [-Winconsistent-dllimport]
extern "C" void print_i32(int32_t i) { fprintf(stdout, "%" PRId32, i); }

^

D:\llvm-project\mlir\include\mlir/ExecutionEngine/CRunnerUtils.h(168,42): note: previous declaration is here
extern "C" MLIR_CRUNNERUTILS_EXPORT void print_i32(int32_t i);

^

Differential Revision: https://reviews.llvm.org/D76654

Details

Committed
aganeaMar 27 2020, 9:24 AM
Differential Revision
D76654: [mlir] On Windows, silence warning on functions definition
Parents
rGf8c25945e59e: [gn build] Port d60d7d69de9
Branches
Unknown
Tags
Unknown