diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-12 07:05:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-12 07:05:38 +0000 |
commit | c6fdc34ac0183bfa03d65f317c78b7bdac52897e (patch) | |
tree | 383d24d2b5b8409ea360110b89b48d1e395b9017 /CodeGen/ModuleBuilder.cpp | |
parent | e41b7cd768fe5722c1adcf4056d586c59514ec29 (diff) |
Add first pieces of support for parsing and representing
extern "C" in C++ mode. Patch by Mike Stump!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/ModuleBuilder.cpp')
-rw-r--r-- | CodeGen/ModuleBuilder.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CodeGen/ModuleBuilder.cpp b/CodeGen/ModuleBuilder.cpp index 49881c36d9..fff5b3fbff 100644 --- a/CodeGen/ModuleBuilder.cpp +++ b/CodeGen/ModuleBuilder.cpp @@ -13,6 +13,7 @@ #include "clang/CodeGen/ModuleBuilder.h" #include "CodeGenModule.h" +#include "clang/AST/Decl.h" using namespace clang; @@ -34,6 +35,16 @@ void clang::CodeGen::CodeGenFunction(CodeGenModule *B, FunctionDecl *D) { B->EmitFunction(D); } +/// CodeGenLinkageSpec - Emit the specified linkage space to LLVM. +void clang::CodeGen::CodeGenLinkageSpec(CodeGenModule *Builder, + LinkageSpecDecl *LS) { + if (LS->getLanguage() == LinkageSpecDecl::lang_cxx) + Builder->WarnUnsupported(LS, "linkage spec"); + + // FIXME: implement C++ linkage, C linkage works mostly by C + // language reuse already. +} + /// CodeGenGlobalVar - Emit the specified global variable to LLVM. void clang::CodeGen::CodeGenGlobalVar(CodeGenModule *Builder, FileVarDecl *D) { Builder->EmitGlobalVarDeclarator(D); |