summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-14 04:33:21 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-14 04:33:21 +0000
commitff0553ec61c69fc1e117658ab591e259d40824d9 (patch)
treee6722eac29412f22da54b80b81674a60e75a8514 /clang/lib/CodeGen/CodeGenModule.h
parent4dc75de733da45b43667cecfc0b849eda453e5f5 (diff)
downloadbcm5719-llvm-ff0553ec61c69fc1e117658ab591e259d40824d9.tar.gz
bcm5719-llvm-ff0553ec61c69fc1e117658ab591e259d40824d9.zip
Fix subtle bug in generating LLVM function declarations for builtin functions.
The decl wasn't being passed down, which meant that function attributes were not being set correctly. This is particularly important for ARM, since it wants to override the calling convention. Instead we would emit the builtin with the wrong calling convention, and instcombine would come along and merrily shred all the calls to it. :) llvm-svn: 81756
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index f115feba4fd..ff8ffb305df 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -303,7 +303,8 @@ public:
/// getBuiltinLibFunction - Given a builtin id for a function like
/// "__builtin_fabsf", return a Function* for "fabsf".
- llvm::Value *getBuiltinLibFunction(unsigned BuiltinID);
+ llvm::Value *getBuiltinLibFunction(const FunctionDecl *FD,
+ unsigned BuiltinID);
llvm::Function *getMemCpyFn();
llvm::Function *getMemMoveFn();
OpenPOWER on IntegriCloud