From ff4a2d9e2c1ddbf87e00e2a36ae341faf03eafb3 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 1 Jun 2008 15:54:49 +0000 Subject: First cut at setting attributes for functions and calls; this puts us much closer to passing the gcc struct layout tests. It might be possible to refactor this a bit, but I'm not sure there's actually enough common code for that to be useful. To get the calling convention completely correct, a bit of platform-specific code is necessary even for x86-Linux. On x86-Linux, the alignment of function parameters is extremely strange; as far as I can tell, it's always 4 except for SSE vectors or structs containing SSE vectors. I'm continuing to investigate this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51839 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 3e77526067..de2995f6a8 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -26,6 +26,7 @@ namespace llvm { class Function; class GlobalValue; class TargetData; + class FunctionType; } namespace clang { @@ -149,6 +150,10 @@ private: /// searches for any entries in GlobalDeclMap that point to OldVal, changing /// them to point to NewVal. This is badbadbad, FIXME! void ReplaceMapValuesWith(llvm::Constant *OldVal, llvm::Constant *NewVal); + + void SetFunctionAttributes(const FunctionDecl *FD, + llvm::Function *F, + const llvm::FunctionType *FTy); }; } // end namespace CodeGen -- cgit v1.2.3