summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-06-15 21:16:23 +0000
committerChris Lattner <sabre@nondot.org>2007-06-15 21:16:23 +0000
commitd760e468aa8d49632b87947c3cf2bf1ad8d6277c (patch)
tree12762898cdc522a07074ee3d8778f7a60c469245 /clang/CodeGen/CodeGenModule.cpp
parentb48238188e3405d6e14a715d71a39ec04b590d86 (diff)
downloadbcm5719-llvm-d760e468aa8d49632b87947c3cf2bf1ad8d6277c.tar.gz
bcm5719-llvm-d760e468aa8d49632b87947c3cf2bf1ad8d6277c.zip
Don't generate code for prototypes
llvm-svn: 39656
Diffstat (limited to 'clang/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/CodeGen/CodeGenModule.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/CodeGen/CodeGenModule.cpp b/clang/CodeGen/CodeGenModule.cpp
index f1f24f5dcf0..fa1a3d2332e 100644
--- a/clang/CodeGen/CodeGenModule.cpp
+++ b/clang/CodeGen/CodeGenModule.cpp
@@ -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);
}
OpenPOWER on IntegriCloud