Don't generate code for prototypes

llvm-svn: 39656
This commit is contained in:
Chris Lattner 2007-06-15 21:16:23 +00:00
parent b48238188e
commit d760e468aa
1 changed files with 4 additions and 1 deletions

View File

@ -13,11 +13,14 @@
#include "CodeGenModule.h"
#include "CodeGenFunction.h"
#include "clang/AST/Decl.h"
using namespace llvm;
using namespace clang;
using namespace CodeGen;
void CodeGenModule::EmitFunction(FunctionDecl *FD) {
CodeGenFunction(*this).GenerateCode(FD);
// If this is not a prototype, emit the body.
if (FD->getBody())
CodeGenFunction(*this).GenerateCode(FD);
}