[PATCH] D19780: Output OpenCL version in Clang diagnostics

Vedran Miletić via cfe-commits cfe-commits at lists.llvm.org
Fri May 27 08:41:13 PDT 2016


rivanvx added a comment.

@Anastasia I looked into introducing a separate getOpenCLVersion() function (or perhaps three - major version, minor version and version string). This would have to be used in lib/CodeGen/TargetInfo.cpp and lib/Parse/ParseDecl.cpp, and I am undecided on where should one put this code. One option would be in Parse/Parser.h inside class Parser, and then TargetInfo.cpp would have to include Parser.h, unless we decide to declare it inside AST/ASTContext.h.

In any case, this has so far two usages, and they are different (major and minor version in TargetInfo.cpp vs version string in ParseDecl.cpp). Therefore, I would propose to leave this as is for now, and rethink it after the same code has to be used in more places.


http://reviews.llvm.org/D19780





More information about the cfe-commits mailing list