mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Fix handling of missing DataLayout in sanitizers.
Pass::doInitialization is supposed to return False when it did not change the program, not when a fatal error occurs. llvm-svn: 206975
This commit is contained in:
parent
9cce557694
commit
87ddc3340b
@ -1164,7 +1164,7 @@ bool AddressSanitizer::doInitialization(Module &M) {
|
||||
// Initialize the private fields. No one has accessed them before.
|
||||
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
|
||||
if (!DLP)
|
||||
return false;
|
||||
report_fatal_error("data layout missing");
|
||||
DL = &DLP->getDataLayout();
|
||||
|
||||
BL.reset(SpecialCaseList::createOrDie(BlacklistFile));
|
||||
|
@ -345,7 +345,7 @@ FunctionType *DataFlowSanitizer::getCustomFunctionType(FunctionType *T) {
|
||||
bool DataFlowSanitizer::doInitialization(Module &M) {
|
||||
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
|
||||
if (!DLP)
|
||||
return false;
|
||||
report_fatal_error("data layout missing");
|
||||
DL = &DLP->getDataLayout();
|
||||
|
||||
Mod = &M;
|
||||
|
@ -427,7 +427,7 @@ void MemorySanitizer::initializeCallbacks(Module &M) {
|
||||
bool MemorySanitizer::doInitialization(Module &M) {
|
||||
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
|
||||
if (!DLP)
|
||||
return false;
|
||||
report_fatal_error("data layout missing");
|
||||
DL = &DLP->getDataLayout();
|
||||
|
||||
BL.reset(SpecialCaseList::createOrDie(BlacklistFile));
|
||||
|
@ -226,7 +226,7 @@ void ThreadSanitizer::initializeCallbacks(Module &M) {
|
||||
bool ThreadSanitizer::doInitialization(Module &M) {
|
||||
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
|
||||
if (!DLP)
|
||||
return false;
|
||||
report_fatal_error("data layout missing");
|
||||
DL = &DLP->getDataLayout();
|
||||
BL.reset(SpecialCaseList::createOrDie(BlacklistFile));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user