diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 15:35:43 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 15:35:43 +0000 |
| commit | b5054333eca797944a852efa9e39512bbed924ea (patch) | |
| tree | 689815668e0f9e1c9f65085a3acc8583df1dad82 | |
| parent | f54432388f66c8e9c56693fcacc3ccbade657150 (diff) | |
| download | bcm5719-llvm-b5054333eca797944a852efa9e39512bbed924ea.tar.gz bcm5719-llvm-b5054333eca797944a852efa9e39512bbed924ea.zip | |
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)
llvm-svn: 229260
| -rw-r--r-- | llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp index 2f55bd442e1..22992b47f40 100644 --- a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp +++ b/llvm/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; } |

