mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
R600: 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@229222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
39127e77ae
commit
20d6ad9de2
@ -15,9 +15,7 @@ AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
|
||||
LDSSize(0),
|
||||
ScratchSize(0),
|
||||
IsKernel(true) {
|
||||
AttributeSet Set = MF.getFunction()->getAttributes();
|
||||
Attribute A = Set.getAttribute(AttributeSet::FunctionIndex,
|
||||
ShaderTypeAttribute);
|
||||
Attribute A = MF.getFunction()->getFnAttribute(ShaderTypeAttribute);
|
||||
|
||||
if (A.isStringAttribute()) {
|
||||
StringRef Str = A.getValueAsString();
|
||||
|
@ -61,8 +61,7 @@ bool SITypeRewriter::doInitialization(Module &M) {
|
||||
}
|
||||
|
||||
bool SITypeRewriter::runOnFunction(Function &F) {
|
||||
AttributeSet Set = F.getAttributes();
|
||||
Attribute A = Set.getAttribute(AttributeSet::FunctionIndex, "ShaderType");
|
||||
Attribute A = F.getFnAttribute("ShaderType");
|
||||
|
||||
unsigned ShaderType = ShaderType::COMPUTE;
|
||||
if (A.isStringAttribute()) {
|
||||
|
Loading…
Reference in New Issue
Block a user