summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-02-07 18:36:51 +0000
committerEric Fiselier <eric@efcs.ca>2018-02-07 18:36:51 +0000
commit123c749ee9973c20bbcb9ecfe6f9b0860b55bc51 (patch)
tree741a4029a14ff3cbb55afbad42ebe6cbe21ec415 /clang/lib/CodeGen/CodeGenModule.h
parentd18430018d7798494a117931735d236d726a91fc (diff)
downloadbcm5719-llvm-123c749ee9973c20bbcb9ecfe6f9b0860b55bc51.tar.gz
bcm5719-llvm-123c749ee9973c20bbcb9ecfe6f9b0860b55bc51.zip
[Driver] Add option to manually control discarding value names in LLVM IR.
Summary: Currently, assertion-disabled Clang builds emit value names when generating LLVM IR. This is controlled by the `NDEBUG` macro, and is not easily overridable. In order to get IR output containing names from a release build of Clang, the user must manually construct the CC1 invocation w/o the `-discard-value-names` option. This is less than ideal. For example, Godbolt uses a release build of Clang, and so when asked to emit LLVM IR the result lacks names, making it harder to read. Manually invoking CC1 on Compiler Explorer is not feasible. This patch adds the driver options `-fdiscard-value-names` and `-fno-discard-value-names` which allow the user to override the default behavior. If neither is specified, the old behavior remains. Reviewers: erichkeane, aaron.ballman, lebedev.ri Reviewed By: aaron.ballman Subscribers: bogner, cfe-commits Differential Revision: https://reviews.llvm.org/D42887 llvm-svn: 324498
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud