[Openmp-commits] [PATCH] D106752: [OpenMP][Tool] Introducing the `llvm-deviceinfo` tool

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 10:03:40 PDT 2021


jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/tools/deviceinfo/llvm-deviceinfo.cpp:15
+#include "omptarget.h"
+#include <iostream>
+
----------------
tianshilei1992 wrote:
> jdoerfert wrote:
> > 
> It's a C++ file. No reason to use `stdio.h` instead of C++ header.
`cstdio` then. Why include `iostream` which will eventually include `cstdio` which will include `stdio.h` just for printf. There is a lot that can go wrong with streams if the setup is not proper and there is no reason I can think of to go down that road for printf. C standard libary headers are compatible with C++.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106752



More information about the Openmp-commits mailing list