[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-20 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. In https://reviews.llvm.org/D45255#1073710, @miyuki wrote: > In https://reviews.llvm.org/D45255#1073703, @JDevlieghere wrote: > > > If it were the other way around I’d agree with you, but given that -Qn > > becomes the default, I think we should not strip it from th

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-20 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. In https://reviews.llvm.org/D45255#1073703, @JDevlieghere wrote: > If it were the other way around I’d agree with you, but given that -Qn > becomes the default, I think we should not strip it from the debug info. No, the default is -Qy Repository: rC Clang https://

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-20 Thread Mikhail Maltsev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330442: [CodeGen] Add an option to suppress output of llvm.ident (authored by miyuki, committed by ). Repository: rC Clang https://reviews.llvm.org/D45255 Files: include/clang/Driver/Options.td in

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-20 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. I’m happy with the test, thanks! In https://reviews.llvm.org/D45255#1072335, @aprantl wrote: > I'm not sure. Compatibility with GCC and getting identical output for > debugging purposes seem to be at odds here. I personally lean slightly > towards stripping it fro

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-20 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki updated this revision to Diff 143327. miyuki added a comment. Updated the test https://reviews.llvm.org/D45255 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CodeGenModule.cpp lib/Driver/ToolChains/Clang.

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-19 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. I'm not sure. Compatibility with GCC and getting identical output for debugging purposes seem to be at odds here. I personally lean slightly towards stripping it from the debug info as well. https://reviews.llvm.org/D45255 ___

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-19 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. In https://reviews.llvm.org/D45255#1072200, @aprantl wrote: > Does gcc's Qy/Qn option also affect the generated debug information? No, it does not. Do you think it would be better to leave debug information unchanged as well? https://reviews.llvm.org/D45255 ___

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-19 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Does gcc's Qy/Qn option also affect the generated debug information? Clang is embedding the version number also into the DICompileUnit's producer string; I wonder if that should be affected by this option, too. https://reviews.llvm.org/D45255 ___

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-19 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: test/CodeGen/no-ident-version.c:1 +// RUN: %clang_cc1 -Qn -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s + Please test both -Qy and -Qn as well as the default case. https://reviews.llvm.org/D45255

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-19 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. ping https://reviews.llvm.org/D45255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-12 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added a comment. There is a flag `-fno-ident` that has the same effect in GCC https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-ident although it involves also ignoring the `#ident`. A quick look seems to suggest that #ident is just ignored in the usual PP callbacks u

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-12 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. One use case for this is debugging: this flag makes it easier to find out which revisions of LLVM introduce changes in codegen and/or debug information without having to filter out .ident/producer metadata. Some users can also use this flag (or an equivalent, -fno-ident)

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-12 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki updated this revision to Diff 142165. miyuki added a comment. Updated the test case https://reviews.llvm.org/D45255 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CodeGenModule.cpp lib/Driver/ToolChains/C

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-11 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. What's your use-case for this? Comment at: test/CodeGen/no-ident-version.c:4 +// CHECK-NOT: llvm.ident +// CHECK-NOT: producer: +int main(void) {} You'll also want to check for something positive, otherwise this test will succeed even

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-11 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. ping https://reviews.llvm.org/D45255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45255: [CodeGen] Add an option to suppress output of llvm.ident

2018-04-04 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki created this revision. miyuki added a reviewer: faisalv. Herald added subscribers: JDevlieghere, aprantl. By default Clang outputs its version (including git commit hash, in case of trunk builds) into object and assembly files. It might be useful to have an option to disable this, especiall