Revert r256277 and r256279.
[oota-llvm.git] / lib / Analysis / InlineCost.cpp
index 7155c149867d9ceefda68f257a077936b44c6c09..cebc8731d4d3c30bfaf1dce20ce7743e0dfaaa86 100644 (file)
@@ -1362,7 +1362,9 @@ static bool functionsHaveCompatibleAttributes(Function *Caller,
                                               Function *Callee,
                                               TargetTransformInfo &TTI) {
   return TTI.areInlineCompatible(Caller, Callee) &&
-         AttributeFuncs::areInlineCompatible(*Caller, *Callee);
+         attributeMatches(Caller, Callee, Attribute::SanitizeAddress) &&
+         attributeMatches(Caller, Callee, Attribute::SanitizeMemory) &&
+         attributeMatches(Caller, Callee, Attribute::SanitizeThread);
 }
 
 InlineCost InlineCostAnalysis::getInlineCost(CallSite CS, Function *Callee,