llvm-project/clang/docs
Eric Fiselier 123c749ee9 [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
2018-02-07 18:36:51 +00:00
..
CommandGuide
analyzer [analyzer] Document the issue hash debugging facility 2017-11-13 11:13:02 +00:00
tools [ASTMatchers] Support generating docs for single-line matchers 2018-01-17 23:14:49 +00:00
AddressSanitizer.rst [docs] Update LeakSanitizer documentation to reflect OS X support 2017-09-13 19:40:10 +00:00
AttributeReference.rst
AutomaticReferenceCounting.rst
Block-ABI-Apple.rst
Block-ABI-Apple.txt
BlockLanguageSpec.rst
CMakeLists.txt
ClangCheck.rst
ClangCommandLineReference.rst [Docs] Re-generate command line documentation. 2018-01-23 18:40:15 +00:00
ClangFormat.rst [Docs] Update list of languages clang-format can format 2017-11-22 10:47:35 +00:00
ClangFormatStyleOptions.rst Fix typos of occurred and occurrence 2018-01-24 10:26:09 +00:00
ClangPlugins.rst
ClangTools.rst
ControlFlowIntegrity.rst [CFI] Add CFI-icall pointer type generalization 2017-10-31 22:39:44 +00:00
ControlFlowIntegrityDesign.rst Fix broken links to the Itanium CXX ABI 2017-09-12 00:21:17 +00:00
CrossCompilation.rst
DataFlowSanitizer.rst
DataFlowSanitizerDesign.rst
DiagnosticsReference.rst [www] Regenerate diagnostics reference. 2017-10-26 21:06:52 +00:00
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst
FAQ.rst
HardwareAssistedAddressSanitizerDesign.rst [hwasan] Add a paragraph on stack instrumentation. 2018-02-03 01:06:21 +00:00
HowToSetupToolingForLLVM.rst
InternalsManual.rst [NFC] fix trivial typos in comments and documents 2018-01-26 08:15:52 +00:00
IntroductionToTheClangAST.rst
ItaniumMangleAbiTags.rst
JSONCompilationDatabase.rst [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found. 2017-11-09 10:37:39 +00:00
LTOVisibility.rst
LanguageExtensions.rst Support `#pragma comment(lib, "name")` in the frontend for ELF 2018-02-07 01:46:46 +00:00
LeakSanitizer.rst [docs] Update LeakSanitizer documentation to reflect OS X support 2017-09-13 19:40:10 +00:00
LibASTMatchers.rst
LibASTMatchersReference.html Add hasTrailingReturn AST matcher 2018-01-22 22:45:23 +00:00
LibASTMatchersTutorial.rst
LibFormat.rst
LibTooling.rst
MSVCCompatibility.rst
Makefile.sphinx
MemorySanitizer.rst
Modules.rst [Modules] Change private modules rules and warnings 2017-12-22 02:53:30 +00:00
ObjectiveCLiterals.rst
OpenMPSupport.rst [DOCS] Mention OpenMP Tools Interface in runtime library 2018-01-22 15:27:45 +00:00
PCHInternals.rst
PCHLayout.graffle
PCHLayout.png
PTHInternals.rst
RAVFrontendAction.rst
README.txt
RefactoringEngine.rst Fix small nits in clang-refactor doc. 2017-10-10 09:00:56 +00:00
ReleaseNotes.rst Document attribute target multiversioning. 2018-01-08 23:36:29 +00:00
SafeStack.rst
SanitizerCoverage.rst docs: don't say that data flow tracing interface is unstable 2017-08-31 11:02:44 +00:00
SanitizerSpecialCaseList.rst Allow specifying sanitizers in blacklists 2017-09-25 22:11:12 +00:00
SanitizerStats.rst
SourceBasedCodeCoverage.rst
ThinLTO.rst [NFC] fix trivial typo in document 2018-01-16 13:19:31 +00:00
ThreadSafetyAnalysis.rst
ThreadSanitizer.rst
Toolchain.rst [Docs] Fix typo in toolchain documentation 2018-01-12 02:57:02 +00:00
Tooling.rst
UndefinedBehaviorSanitizer.rst [ubsan] Diagnose noreturn functions which return 2017-12-21 00:10:25 +00:00
UsersManual.rst [Driver] Add option to manually control discarding value names in LLVM IR. 2018-02-07 18:36:51 +00:00
conf.py Update docs version and clear release notes for 7.0.0 2018-01-03 15:49:39 +00:00
doxygen-mainpage.dox
doxygen.cfg.in [NFC] fix trivial typos in comments and documents 2018-01-26 08:15:52 +00:00
index.rst [OPENMP] Current status of OpenMP support. 2018-01-08 19:02:51 +00:00
make.bat

README.txt

See llvm/docs/README.txt