diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-01-10 12:58:08 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-01-10 12:58:08 +0000 |
commit | 82d0a418c8699fc6f4a9417457ffe93d43bba1c1 (patch) | |
tree | e0ee69587ef2122adc4528807f5899519b8f40e3 /lib/CodeGen/CodeGenModule.h | |
parent | 82bac50fc0ab125ff5b4308ee91a731e3761eb63 (diff) |
Generalize target weirdness handling having proper layering in mind:
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes
As a proof-of-concept - implement msp430's 'interrupt' attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 47d8c54cd9..c7aa7a47a8 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -43,6 +43,7 @@ namespace llvm { } namespace clang { + class TargetCodeGenInfo; class ASTContext; class FunctionDecl; class IdentifierInfo; @@ -85,6 +86,7 @@ class CodeGenModule : public BlockModule { const CodeGenOptions &CodeGenOpts; llvm::Module &TheModule; const llvm::TargetData &TheTargetData; + mutable const TargetCodeGenInfo *TheTargetCodeGenInfo; Diagnostic &Diags; CodeGenTypes Types; MangleContext MangleCtx; @@ -191,6 +193,7 @@ public: Diagnostic &getDiags() const { return Diags; } const llvm::TargetData &getTargetData() const { return TheTargetData; } llvm::LLVMContext &getLLVMContext() { return VMContext; } + const TargetCodeGenInfo &getTargetCodeGenInfo() const; /// getDeclVisibilityMode - Compute the visibility of the decl \arg D. LangOptions::VisibilityMode getDeclVisibilityMode(const Decl *D) const; |