Avoid using the cast and use the templated accessor function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2015-01-30 23:46:40 +00:00
parent cfb61b368c
commit 8e55a9e78d

View File

@ -58,7 +58,7 @@ public:
FnAttrs.hasAttribute(AttributeSet::FunctionIndex,
Attribute::OptimizeForSize) ||
FnAttrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::MinSize);
Subtarget = &static_cast<const AArch64Subtarget &>(MF.getSubtarget());
Subtarget = &MF.getSubtarget<AArch64Subtarget>();
return SelectionDAGISel::runOnMachineFunction(MF);
}