diff options
| author | Reid Kleckner <rnk@google.com> | 2017-05-02 22:07:37 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-05-02 22:07:37 +0000 |
| commit | ee4930b6886d713778fff4de3948946c7658d9d9 (patch) | |
| tree | 24f60ae0cadbe03c5b098d2c86bba5ebfd88636f /clang/lib/CodeGen/TargetInfo.cpp | |
| parent | 65134057357725c245fcfeb4b588518ef6d6db20 (diff) | |
| download | bcm5719-llvm-ee4930b6886d713778fff4de3948946c7658d9d9.tar.gz bcm5719-llvm-ee4930b6886d713778fff4de3948946c7658d9d9.zip | |
Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"
This time, I fixed, built, and tested clang.
This reverts r301712.
llvm-svn: 301981
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 94c3880ea26..ecd81d84b1f 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -1901,10 +1901,7 @@ void X86_32TargetCodeGenInfo::setTargetAttributes(const Decl *D, // Now add the 'alignstack' attribute with a value of 16. llvm::AttrBuilder B; B.addStackAlignmentAttr(16); - Fn->addAttributes( - llvm::AttributeList::FunctionIndex, - llvm::AttributeList::get(CGM.getLLVMContext(), - llvm::AttributeList::FunctionIndex, B)); + Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); } if (FD->hasAttr<AnyX86InterruptAttr>()) { llvm::Function *Fn = cast<llvm::Function>(GV); @@ -5449,10 +5446,7 @@ public: // the backend to perform a realignment as part of the function prologue. llvm::AttrBuilder B; B.addStackAlignmentAttr(8); - Fn->addAttributes( - llvm::AttributeList::FunctionIndex, - llvm::AttributeList::get(CGM.getLLVMContext(), - llvm::AttributeList::FunctionIndex, B)); + Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); } }; |

