aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-18 23:50:03 +0000
committerReid Kleckner <rnk@google.com>2017-04-18 23:50:03 +0000
commitcdd26794a9516b4a4f90e46414da3754cbcf78af (patch)
tree8bd40425f05afc60e176a425ae21963ae1423564 /clang/lib/CodeGen/CodeGenModule.cpp
parent9f7cc58f81a43d6f6c413e38e51e0ab68e7b71fc (diff)
downloadllvm-cdd26794a9516b4a4f90e46414da3754cbcf78af.zip
llvm-cdd26794a9516b4a4f90e46414da3754cbcf78af.tar.gz
llvm-cdd26794a9516b4a4f90e46414da3754cbcf78af.tar.bz2
Use less temporary AttributeLists NFC
llvm-svn: 300628
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index d69ece8..d84c543 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -841,10 +841,9 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D,
const CGFunctionInfo &Info,
llvm::Function *F) {
unsigned CallingConv;
- AttributeListType AttributeList;
- ConstructAttributeList(F->getName(), Info, D, AttributeList, CallingConv,
- false);
- F->setAttributes(llvm::AttributeList::get(getLLVMContext(), AttributeList));
+ llvm::AttributeList PAL;
+ ConstructAttributeList(F->getName(), Info, D, PAL, CallingConv, false);
+ F->setAttributes(PAL);
F->setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv));
}