zcov: / lib/CodeGen/TargetInfo.h


Files: 1 Branches Taken: 0.0% 0 / 0
Generated: 2010-02-10 01:31 Branches Executed: 0.0% 0 / 0
Line Coverage: 100.0% 3 / 3


Programs: 2 Runs 5794


       1                 : //===---- TargetInfo.h - Encapsulate target details -------------*- C++ -*-===//
       2                 : //
       3                 : //                     The LLVM Compiler Infrastructure
       4                 : //
       5                 : // This file is distributed under the University of Illinois Open Source
       6                 : // License. See LICENSE.TXT for details.
       7                 : //
       8                 : //===----------------------------------------------------------------------===//
       9                 : //
      10                 : // These classes wrap the information about a call or function
      11                 : // definition used to handle ABI compliancy.
      12                 : //
      13                 : //===----------------------------------------------------------------------===//
      14                 : 
      15                 : #ifndef CLANG_CODEGEN_TARGETINFO_H
      16                 : #define CLANG_CODEGEN_TARGETINFO_H
      17                 : 
      18                 : namespace llvm {
      19                 :   class GlobalValue;
      20                 : }
      21                 : 
      22                 : namespace clang {
      23                 :   class ABIInfo;
      24                 :   class Decl;
      25                 : 
      26                 :   namespace CodeGen {
      27                 :     class CodeGenModule;
      28                 :   }
      29                 : 
      30                 :   /// TargetCodeGenInfo - This class organizes various target-specific
      31                 :   /// codegeneration issues, like target-specific attributes, builtins and so
      32                 :   /// on.
      33                 :   class TargetCodeGenInfo {
      34                 :     ABIInfo *Info;
      35                 :   public:
      36                 :     // WARNING: Acquires the ownership of ABIInfo.
      37              625:     TargetCodeGenInfo(ABIInfo *info = 0):Info(info) { }
      38                 :     virtual ~TargetCodeGenInfo();
      39                 : 
      40                 :     /// getABIInfo() - Returns ABI info helper for the target.
      41              625:     const ABIInfo& getABIInfo() const { return *Info; }
      42                 : 
      43                 :     /// SetTargetAttributes - Provides a convenient hook to handle extra
      44                 :     /// target-specific attributes for the given global.
      45                 :     virtual void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
      46             3481:                                      CodeGen::CodeGenModule &M) const { }
      47                 :   };
      48                 : }
      49                 : 
      50                 : #endif // CLANG_CODEGEN_TARGETINFO_H

Generated: 2010-02-10 01:31 by zcov