aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2016-01-06 14:35:46 +0000
committerChad Rosier <mcrosier@codeaurora.org>2016-01-06 14:35:46 +0000
commit7dbc9cf8760e07f28cea29e337ff3666624dc91d (patch)
tree535726e6c08e0a98ffbb3de5e2a3280cc32acaf6 /clang/lib/CodeGen/CodeGenModule.cpp
parent2d0418e842e1635aaff4a642320dfa8fbf7669fd (diff)
downloadllvm-7dbc9cf8760e07f28cea29e337ff3666624dc91d.zip
llvm-7dbc9cf8760e07f28cea29e337ff3666624dc91d.tar.gz
llvm-7dbc9cf8760e07f28cea29e337ff3666624dc91d.tar.bz2
[Driver] Add support for -fno-builtin-foo options.
Addresses PR4941 and rdar://6756912. http://reviews.llvm.org/D15195 llvm-svn: 256937
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index f57785f..536c55a 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -774,7 +774,8 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D,
llvm::Function *F) {
unsigned CallingConv;
AttributeListType AttributeList;
- ConstructAttributeList(Info, D, AttributeList, CallingConv, false);
+ ConstructAttributeList(F->getName(), Info, D, AttributeList, CallingConv,
+ false);
F->setAttributes(llvm::AttributeSet::get(getLLVMContext(), AttributeList));
F->setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv));
}