mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Band-aid fix for PR22032: don't emit DWARF debug info if AddressSanitizer is enabled on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -222,12 +222,25 @@ bool AsmPrinter::doInitialization(Module &M) {
|
||||
}
|
||||
|
||||
if (MAI->doesSupportDebugInformation()) {
|
||||
if (Triple(TM.getTargetTriple()).isKnownWindowsMSVCEnvironment())
|
||||
bool skip_dwarf = false;
|
||||
if (Triple(TM.getTargetTriple()).isKnownWindowsMSVCEnvironment()) {
|
||||
Handlers.push_back(HandlerInfo(new WinCodeViewLineTables(this),
|
||||
DbgTimerName,
|
||||
CodeViewLineTablesGroupName));
|
||||
DD = new DwarfDebug(this, &M);
|
||||
Handlers.push_back(HandlerInfo(DD, DbgTimerName, DWARFGroupName));
|
||||
// FIXME: Don't emit DWARF debug info if there's at least one function
|
||||
// with AddressSanitizer instrumentation.
|
||||
// This is a band-aid fix for PR22032.
|
||||
for (auto &F : M.functions()) {
|
||||
if (F.hasFnAttribute(Attribute::SanitizeAddress)) {
|
||||
skip_dwarf = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!skip_dwarf) {
|
||||
DD = new DwarfDebug(this, &M);
|
||||
Handlers.push_back(HandlerInfo(DD, DbgTimerName, DWARFGroupName));
|
||||
}
|
||||
}
|
||||
|
||||
EHStreamer *ES = nullptr;
|
||||
|
Reference in New Issue
Block a user