[Openmp-commits] [PATCH] D106752: [OpenMP][Tool] Introducing the `llvm-deviceinfo` tool
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jul 26 07:38:21 PDT 2021
JonChesterfield added inline comments.
================
Comment at: openmp/libomptarget/tools/deviceinfo/llvm-deviceinfo.cpp:15
+#include "omptarget.h"
+#include <iostream>
+
----------------
jdoerfert wrote:
> 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++.
+1 for avoiding iostream. Don't have strong preferences for stdio.h vs cstdio.
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