mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Enable output of variable names in ASan and MSan error reporting. (#4004)
This commit is contained in:
parent
421f3d1c0a
commit
a2ce3f31b2
4 changed files with 16 additions and 11 deletions
|
@ -17,6 +17,7 @@
|
|||
#include "dmd/scope.h"
|
||||
#include "driver/cl_options.h"
|
||||
#include "driver/cl_options_instrumentation.h"
|
||||
#include "driver/cl_options_sanitizers.h"
|
||||
#include "driver/linker.h"
|
||||
#include "driver/toobj.h"
|
||||
#include "gen/dynamiccompile.h"
|
||||
|
@ -195,8 +196,11 @@ CodeGenerator::CodeGenerator(llvm::LLVMContext &context,
|
|||
mlirContext_(mlirContext),
|
||||
#endif
|
||||
moduleCount_(0), singleObj_(singleObj), ir_(nullptr) {
|
||||
// Set the context to discard value names when not generating textual IR.
|
||||
if (!global.params.output_ll) {
|
||||
// Set the context to discard value names when not generating textual IR and
|
||||
// when ASan or MSan are not enabled.
|
||||
if (!global.params.output_ll &&
|
||||
!opts::isSanitizerEnabled(opts::AddressSanitizer |
|
||||
opts::MemorySanitizer)) {
|
||||
context_.setDiscardValueNames(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue