remove dead method.
[oota-llvm.git] / include / llvm / Target / TargetAsmBackend.h
1 //===-- llvm/Target/TargetAsmBackend.h - Target Asm Backend -----*- 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 #ifndef LLVM_TARGET_TARGETASMBACKEND_H
11 #define LLVM_TARGET_TARGETASMBACKEND_H
12
13 namespace llvm {
14 class Target;
15
16 /// TargetAsmBackend - Generic interface to target specific assembler backends.
17 class TargetAsmBackend {
18   TargetAsmBackend(const TargetAsmBackend &);   // DO NOT IMPLEMENT
19   void operator=(const TargetAsmBackend &);  // DO NOT IMPLEMENT
20 protected: // Can only create subclasses.
21   TargetAsmBackend(const Target &);
22
23   /// TheTarget - The Target that this machine was created for.
24   const Target &TheTarget;
25
26 public:
27   virtual ~TargetAsmBackend();
28
29   const Target &getTarget() const { return TheTarget; }
30
31   /// hasAbsolutizedSet - Check whether this target "absolutizes"
32   /// assignments. That is, given code like:
33   ///   a:
34   ///   ...
35   ///   b:
36   ///   tmp = a - b
37   ///       .long tmp
38   /// will the value of 'tmp' be a relocatable expression, or the assembly time
39   /// value of L0 - L1. This distinction is only relevant for platforms that
40   /// support scattered symbols, since in the absence of scattered symbols (a -
41   /// b) cannot change after assembly.
42   virtual bool hasAbsolutizedSet() const { return false; }
43
44   /// hasScatteredSymbols - Check whether this target supports scattered
45   /// symbols. If so, the assembler should assume that atoms can be scattered by
46   /// the linker. In particular, this means that the offsets between symbols
47   /// which are in distinct atoms is not known at link time, and the assembler
48   /// must generate fixups and relocations appropriately.
49   ///
50   /// Note that the assembler currently does not reason about atoms, instead it
51   /// assumes all temporary symbols reside in the "current atom".
52   virtual bool hasScatteredSymbols() const { return false; }
53 };
54
55 } // End llvm namespace
56
57 #endif