[PATCH] D64222: [sanitizers] Use covering ObjectFormatType switches
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 01:46:08 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366544: [sanitizers] Use covering ObjectFormatType switches (authored by hubert.reinterpretcast, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D64222?vs=208085&id=210772#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64222/new/
https://reviews.llvm.org/D64222
Files:
cfe/trunk/lib/CodeGen/BackendUtil.cpp
llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Index: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1919,7 +1919,12 @@
case Triple::COFF: return ".ASAN$GL";
case Triple::ELF: return "asan_globals";
case Triple::MachO: return "__DATA,__asan_globals,regular";
- default: break;
+ case Triple::Wasm:
+ case Triple::XCOFF:
+ report_fatal_error(
+ "ModuleAddressSanitizer not implemented for object file format.");
+ case Triple::UnknownObjectFormat:
+ break;
}
llvm_unreachable("unsupported object format");
}
Index: cfe/trunk/lib/CodeGen/BackendUtil.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp
@@ -231,9 +231,13 @@
return true;
case Triple::ELF:
return CGOpts.DataSections && !CGOpts.DisableIntegratedAS;
- default:
- return false;
+ case Triple::XCOFF:
+ llvm::report_fatal_error("ASan not implemented for XCOFF.");
+ case Triple::Wasm:
+ case Triple::UnknownObjectFormat:
+ break;
}
+ return false;
}
static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64222.210772.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190719/d0a98b25/attachment.bin>
More information about the cfe-commits
mailing list