[all-commits] [llvm/llvm-project] 667781: [mlir] On Windows, silence warning on functions de...

Alexandre Ganea via All-commits all-commits at lists.llvm.org
Fri Mar 27 09:24:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 667781592a44ed02f42d4a07c85cf1a898543304
      https://github.com/llvm/llvm-project/commit/667781592a44ed02f42d4a07c85cf1a898543304
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-03-27 (Fri, 27 Mar 2020)

  Changed paths:
    M mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
    M mlir/lib/ExecutionEngine/CRunnerUtils.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list