mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Analysis: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -298,8 +298,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs,
|
||||
|
||||
// Load widening is hostile to ThreadSanitizer: it may cause false positives
|
||||
// or make the reports more cryptic (access sizes are wrong).
|
||||
if (LI->getParent()->getParent()->getAttributes().
|
||||
hasAttribute(AttributeSet::FunctionIndex, Attribute::SanitizeThread))
|
||||
if (LI->getParent()->getParent()->hasFnAttribute(Attribute::SanitizeThread))
|
||||
return 0;
|
||||
|
||||
// Get the base of this load.
|
||||
@ -344,9 +343,9 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs,
|
||||
!DL.fitsInLegalInteger(NewLoadByteSize*8))
|
||||
return 0;
|
||||
|
||||
if (LIOffs+NewLoadByteSize > MemLocEnd &&
|
||||
LI->getParent()->getParent()->getAttributes().
|
||||
hasAttribute(AttributeSet::FunctionIndex, Attribute::SanitizeAddress))
|
||||
if (LIOffs + NewLoadByteSize > MemLocEnd &&
|
||||
LI->getParent()->getParent()->hasFnAttribute(
|
||||
Attribute::SanitizeAddress))
|
||||
// We will be reading past the location accessed by the original program.
|
||||
// While this is safe in a regular build, Address Safety analysis tools
|
||||
// may start reporting false warnings. So, don't do widening.
|
||||
|
Reference in New Issue
Block a user