From 8cfbff509ebb9d069e3a7478bc36e7e1bc1d9527 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sat, 14 Feb 2015 15:35:43 +0000 Subject: [PATCH] NVPTX: 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@229260 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp b/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp index 2f55bd442e1..22992b47f40 100644 --- a/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp +++ b/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp @@ -93,9 +93,7 @@ bool NVPTXDAGToDAGISel::useF32FTZ() const { const Function *F = MF->getFunction(); // Otherwise, check for an nvptx-f32ftz attribute on the function if (F->hasFnAttribute("nvptx-f32ftz")) - return (F->getAttributes().getAttribute(AttributeSet::FunctionIndex, - "nvptx-f32ftz") - .getValueAsString() == "true"); + return F->getFnAttribute("nvptx-f32ftz").getValueAsString() == "true"; else return false; } -- 2.34.1