OSDN Git Service

1790905a1245f03801f23fb7bb7b35aceb1a91e0
[android-x86/external-llvm.git] / include / llvm / MC / MCContext.h
1 //===- MCContext.h - Machine Code Context -----------------------*- 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_MC_MCCONTEXT_H
11 #define LLVM_MC_MCCONTEXT_H
12
13 #include "llvm/ADT/DenseMap.h"
14 #include "llvm/ADT/SetVector.h"
15 #include "llvm/ADT/SmallString.h"
16 #include "llvm/ADT/SmallVector.h"
17 #include "llvm/ADT/StringMap.h"
18 #include "llvm/ADT/Twine.h"
19 #include "llvm/MC/MCDwarf.h"
20 #include "llvm/MC/SectionKind.h"
21 #include "llvm/Support/Allocator.h"
22 #include "llvm/Support/Compiler.h"
23 #include "llvm/Support/raw_ostream.h"
24 #include <map>
25 #include <tuple>
26 #include <vector> // FIXME: Shouldn't be needed.
27
28 namespace llvm {
29   class MCAsmInfo;
30   class MCExpr;
31   class MCSection;
32   class MCSymbol;
33   class MCSymbolELF;
34   class MCLabel;
35   struct MCDwarfFile;
36   class MCDwarfLoc;
37   class MCObjectFileInfo;
38   class MCRegisterInfo;
39   class MCLineSection;
40   class SMLoc;
41   class MCSectionMachO;
42   class MCSectionELF;
43   class MCSectionCOFF;
44
45   /// Context object for machine code objects.  This class owns all of the
46   /// sections that it creates.
47   ///
48   class MCContext {
49     MCContext(const MCContext &) = delete;
50     MCContext &operator=(const MCContext &) = delete;
51
52   public:
53     typedef StringMap<MCSymbol *, BumpPtrAllocator &> SymbolTable;
54
55   private:
56     /// The SourceMgr for this object, if any.
57     const SourceMgr *SrcMgr;
58
59     /// The MCAsmInfo for this target.
60     const MCAsmInfo *MAI;
61
62     /// The MCRegisterInfo for this target.
63     const MCRegisterInfo *MRI;
64
65     /// The MCObjectFileInfo for this target.
66     const MCObjectFileInfo *MOFI;
67
68     /// Allocator object used for creating machine code objects.
69     ///
70     /// We use a bump pointer allocator to avoid the need to track all allocated
71     /// objects.
72     BumpPtrAllocator Allocator;
73
74     /// Bindings of names to symbols.
75     SymbolTable Symbols;
76
77     /// ELF sections can have a corresponding symbol. This maps one to the
78     /// other.
79     DenseMap<const MCSectionELF *, MCSymbolELF *> SectionSymbols;
80
81     /// A mapping from a local label number and an instance count to a symbol.
82     /// For example, in the assembly
83     ///     1:
84     ///     2:
85     ///     1:
86     /// We have three labels represented by the pairs (1, 0), (2, 0) and (1, 1)
87     DenseMap<std::pair<unsigned, unsigned>, MCSymbol *> LocalSymbols;
88
89     /// Keeps tracks of names that were used both for used declared and
90     /// artificial symbols.
91     StringMap<bool, BumpPtrAllocator &> UsedNames;
92
93     /// The next ID to dole out to an unnamed assembler temporary symbol with
94     /// a given prefix.
95     StringMap<unsigned> NextID;
96
97     /// Instances of directional local labels.
98     DenseMap<unsigned, MCLabel *> Instances;
99     /// NextInstance() creates the next instance of the directional local label
100     /// for the LocalLabelVal and adds it to the map if needed.
101     unsigned NextInstance(unsigned LocalLabelVal);
102     /// GetInstance() gets the current instance of the directional local label
103     /// for the LocalLabelVal and adds it to the map if needed.
104     unsigned GetInstance(unsigned LocalLabelVal);
105
106     /// The file name of the log file from the environment variable
107     /// AS_SECURE_LOG_FILE.  Which must be set before the .secure_log_unique
108     /// directive is used or it is an error.
109     char *SecureLogFile;
110     /// The stream that gets written to for the .secure_log_unique directive.
111     raw_ostream *SecureLog;
112     /// Boolean toggled when .secure_log_unique / .secure_log_reset is seen to
113     /// catch errors if .secure_log_unique appears twice without
114     /// .secure_log_reset appearing between them.
115     bool SecureLogUsed;
116
117     /// The compilation directory to use for DW_AT_comp_dir.
118     SmallString<128> CompilationDir;
119
120     /// The main file name if passed in explicitly.
121     std::string MainFileName;
122
123     /// The dwarf file and directory tables from the dwarf .file directive.
124     /// We now emit a line table for each compile unit. To reduce the prologue
125     /// size of each line table, the files and directories used by each compile
126     /// unit are separated.
127     std::map<unsigned, MCDwarfLineTable> MCDwarfLineTablesCUMap;
128
129     /// The current dwarf line information from the last dwarf .loc directive.
130     MCDwarfLoc CurrentDwarfLoc;
131     bool DwarfLocSeen;
132
133     /// Generate dwarf debugging info for assembly source files.
134     bool GenDwarfForAssembly;
135
136     /// The current dwarf file number when generate dwarf debugging info for
137     /// assembly source files.
138     unsigned GenDwarfFileNumber;
139
140     /// Sections for generating the .debug_ranges and .debug_aranges sections.
141     SetVector<MCSection *> SectionsForRanges;
142
143     /// The information gathered from labels that will have dwarf label
144     /// entries when generating dwarf assembly source files.
145     std::vector<MCGenDwarfLabelEntry> MCGenDwarfLabelEntries;
146
147     /// The string to embed in the debug information for the compile unit, if
148     /// non-empty.
149     StringRef DwarfDebugFlags;
150
151     /// The string to embed in as the dwarf AT_producer for the compile unit, if
152     /// non-empty.
153     StringRef DwarfDebugProducer;
154
155     /// The maximum version of dwarf that we should emit.
156     uint16_t DwarfVersion;
157
158     /// Honor temporary labels, this is useful for debugging semantic
159     /// differences between temporary and non-temporary labels (primarily on
160     /// Darwin).
161     bool AllowTemporaryLabels;
162     bool UseNamesOnTempLabels = true;
163
164     /// The Compile Unit ID that we are currently processing.
165     unsigned DwarfCompileUnitID;
166
167     struct ELFSectionKey {
168       std::string SectionName;
169       StringRef GroupName;
170       unsigned UniqueID;
171       ELFSectionKey(StringRef SectionName, StringRef GroupName,
172                     unsigned UniqueID)
173           : SectionName(SectionName), GroupName(GroupName), UniqueID(UniqueID) {
174       }
175       bool operator<(const ELFSectionKey &Other) const {
176         if (SectionName != Other.SectionName)
177           return SectionName < Other.SectionName;
178         if (GroupName != Other.GroupName)
179           return GroupName < Other.GroupName;
180         return UniqueID < Other.UniqueID;
181       }
182     };
183
184     struct COFFSectionKey {
185       std::string SectionName;
186       StringRef GroupName;
187       int SelectionKey;
188       COFFSectionKey(StringRef SectionName, StringRef GroupName,
189                      int SelectionKey)
190           : SectionName(SectionName), GroupName(GroupName),
191             SelectionKey(SelectionKey) {}
192       bool operator<(const COFFSectionKey &Other) const {
193         if (SectionName != Other.SectionName)
194           return SectionName < Other.SectionName;
195         if (GroupName != Other.GroupName)
196           return GroupName < Other.GroupName;
197         return SelectionKey < Other.SelectionKey;
198       }
199     };
200
201     StringMap<MCSectionMachO *> MachOUniquingMap;
202     std::map<ELFSectionKey, MCSectionELF *> ELFUniquingMap;
203     std::map<COFFSectionKey, MCSectionCOFF *> COFFUniquingMap;
204     StringMap<bool> ELFRelSecNames;
205
206     /// Do automatic reset in destructor
207     bool AutoReset;
208
209     MCSymbol *createSymbolImpl(const StringMapEntry<bool> *Name,
210                                bool IsTemporary);
211     MCSymbol *createSymbol(StringRef Name, bool AlwaysAddSuffix,
212                            bool IsTemporary);
213
214     MCSymbol *getOrCreateDirectionalLocalSymbol(unsigned LocalLabelVal,
215                                                 unsigned Instance);
216
217   public:
218     explicit MCContext(const MCAsmInfo *MAI, const MCRegisterInfo *MRI,
219                        const MCObjectFileInfo *MOFI,
220                        const SourceMgr *Mgr = nullptr, bool DoAutoReset = true);
221     ~MCContext();
222
223     const SourceMgr *getSourceManager() const { return SrcMgr; }
224
225     const MCAsmInfo *getAsmInfo() const { return MAI; }
226
227     const MCRegisterInfo *getRegisterInfo() const { return MRI; }
228
229     const MCObjectFileInfo *getObjectFileInfo() const { return MOFI; }
230
231     void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
232     void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; }
233
234     /// \name Module Lifetime Management
235     /// @{
236
237     /// reset - return object to right after construction state to prepare
238     /// to process a new module
239     void reset();
240
241     /// @}
242
243     /// \name Symbol Management
244     /// @{
245
246     /// Create and return a new linker temporary symbol with a unique but
247     /// unspecified name.
248     MCSymbol *createLinkerPrivateTempSymbol();
249
250     /// Create and return a new assembler temporary symbol with a unique but
251     /// unspecified name.
252     MCSymbol *createTempSymbol();
253
254     MCSymbol *createTempSymbol(const Twine &Name, bool AlwaysAddSuffix);
255
256     /// Create the definition of a directional local symbol for numbered label
257     /// (used for "1:" definitions).
258     MCSymbol *createDirectionalLocalSymbol(unsigned LocalLabelVal);
259
260     /// Create and return a directional local symbol for numbered label (used
261     /// for "1b" or 1f" references).
262     MCSymbol *getDirectionalLocalSymbol(unsigned LocalLabelVal, bool Before);
263
264     /// Lookup the symbol inside with the specified \p Name.  If it exists,
265     /// return it.  If not, create a forward reference and return it.
266     ///
267     /// \param Name - The symbol name, which must be unique across all symbols.
268     MCSymbol *getOrCreateSymbol(const Twine &Name);
269
270     MCSymbolELF *getOrCreateSectionSymbol(const MCSectionELF &Section);
271
272     /// Gets a symbol that will be defined to the final stack offset of a local
273     /// variable after codegen.
274     ///
275     /// \param Idx - The index of a local variable passed to @llvm.frameescape.
276     MCSymbol *getOrCreateFrameAllocSymbol(StringRef FuncName, unsigned Idx);
277
278     MCSymbol *getOrCreateParentFrameOffsetSymbol(StringRef FuncName);
279
280     MCSymbol *getOrCreateLSDASymbol(StringRef FuncName);
281
282     /// Get the symbol for \p Name, or null.
283     MCSymbol *lookupSymbol(const Twine &Name) const;
284
285     /// getSymbols - Get a reference for the symbol table for clients that
286     /// want to, for example, iterate over all symbols. 'const' because we
287     /// still want any modifications to the table itself to use the MCContext
288     /// APIs.
289     const SymbolTable &getSymbols() const { return Symbols; }
290
291     /// @}
292
293     /// \name Section Management
294     /// @{
295
296     /// Return the MCSection for the specified mach-o section.  This requires
297     /// the operands to be valid.
298     MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section,
299                                     unsigned TypeAndAttributes,
300                                     unsigned Reserved2, SectionKind K,
301                                     const char *BeginSymName = nullptr);
302
303     MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section,
304                                     unsigned TypeAndAttributes, SectionKind K,
305                                     const char *BeginSymName = nullptr) {
306       return getMachOSection(Segment, Section, TypeAndAttributes, 0, K,
307                              BeginSymName);
308     }
309
310     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
311                                 unsigned Flags) {
312       return getELFSection(Section, Type, Flags, nullptr);
313     }
314
315     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
316                                 unsigned Flags, const char *BeginSymName) {
317       return getELFSection(Section, Type, Flags, 0, "", BeginSymName);
318     }
319
320     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
321                                 unsigned Flags, unsigned EntrySize,
322                                 StringRef Group) {
323       return getELFSection(Section, Type, Flags, EntrySize, Group, nullptr);
324     }
325
326     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
327                                 unsigned Flags, unsigned EntrySize,
328                                 StringRef Group, const char *BeginSymName) {
329       return getELFSection(Section, Type, Flags, EntrySize, Group, ~0,
330                            BeginSymName);
331     }
332
333     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
334                                 unsigned Flags, unsigned EntrySize,
335                                 StringRef Group, unsigned UniqueID) {
336       return getELFSection(Section, Type, Flags, EntrySize, Group, UniqueID,
337                            nullptr);
338     }
339
340     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
341                                 unsigned Flags, unsigned EntrySize,
342                                 StringRef Group, unsigned UniqueID,
343                                 const char *BeginSymName);
344
345     MCSectionELF *getELFSection(StringRef Section, unsigned Type,
346                                 unsigned Flags, unsigned EntrySize,
347                                 const MCSymbolELF *Group, unsigned UniqueID,
348                                 const char *BeginSymName,
349                                 const MCSectionELF *Associated);
350
351     MCSectionELF *createELFRelSection(StringRef Name, unsigned Type,
352                                       unsigned Flags, unsigned EntrySize,
353                                       const MCSymbolELF *Group,
354                                       const MCSectionELF *Associated);
355
356     void renameELFSection(MCSectionELF *Section, StringRef Name);
357
358     MCSectionELF *createELFGroupSection(const MCSymbolELF *Group);
359
360     MCSectionCOFF *getCOFFSection(StringRef Section, unsigned Characteristics,
361                                   SectionKind Kind, StringRef COMDATSymName,
362                                   int Selection,
363                                   const char *BeginSymName = nullptr);
364
365     MCSectionCOFF *getCOFFSection(StringRef Section, unsigned Characteristics,
366                                   SectionKind Kind,
367                                   const char *BeginSymName = nullptr);
368
369     MCSectionCOFF *getCOFFSection(StringRef Section);
370
371     /// Gets or creates a section equivalent to Sec that is associated with the
372     /// section containing KeySym. For example, to create a debug info section
373     /// associated with an inline function, pass the normal debug info section
374     /// as Sec and the function symbol as KeySym.
375     MCSectionCOFF *getAssociativeCOFFSection(MCSectionCOFF *Sec,
376                                              const MCSymbol *KeySym);
377
378     /// @}
379
380     /// \name Dwarf Management
381     /// @{
382
383     /// \brief Get the compilation directory for DW_AT_comp_dir
384     /// This can be overridden by clients which want to control the reported
385     /// compilation directory and have it be something other than the current
386     /// working directory.
387     /// Returns an empty string if the current directory cannot be determined.
388     StringRef getCompilationDir() const { return CompilationDir; }
389
390     /// \brief Set the compilation directory for DW_AT_comp_dir
391     /// Override the default (CWD) compilation directory.
392     void setCompilationDir(StringRef S) { CompilationDir = S.str(); }
393
394     /// \brief Get the main file name for use in error messages and debug
395     /// info. This can be set to ensure we've got the correct file name
396     /// after preprocessing or for -save-temps.
397     const std::string &getMainFileName() const { return MainFileName; }
398
399     /// \brief Set the main file name and override the default.
400     void setMainFileName(StringRef S) { MainFileName = S; }
401
402     /// Creates an entry in the dwarf file and directory tables.
403     unsigned getDwarfFile(StringRef Directory, StringRef FileName,
404                           unsigned FileNumber, unsigned CUID);
405
406     bool isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID = 0);
407
408     const std::map<unsigned, MCDwarfLineTable> &getMCDwarfLineTables() const {
409       return MCDwarfLineTablesCUMap;
410     }
411
412     MCDwarfLineTable &getMCDwarfLineTable(unsigned CUID) {
413       return MCDwarfLineTablesCUMap[CUID];
414     }
415
416     const MCDwarfLineTable &getMCDwarfLineTable(unsigned CUID) const {
417       auto I = MCDwarfLineTablesCUMap.find(CUID);
418       assert(I != MCDwarfLineTablesCUMap.end());
419       return I->second;
420     }
421
422     const SmallVectorImpl<MCDwarfFile> &getMCDwarfFiles(unsigned CUID = 0) {
423       return getMCDwarfLineTable(CUID).getMCDwarfFiles();
424     }
425     const SmallVectorImpl<std::string> &getMCDwarfDirs(unsigned CUID = 0) {
426       return getMCDwarfLineTable(CUID).getMCDwarfDirs();
427     }
428
429     bool hasMCLineSections() const {
430       for (const auto &Table : MCDwarfLineTablesCUMap)
431         if (!Table.second.getMCDwarfFiles().empty() || Table.second.getLabel())
432           return true;
433       return false;
434     }
435     unsigned getDwarfCompileUnitID() { return DwarfCompileUnitID; }
436     void setDwarfCompileUnitID(unsigned CUIndex) {
437       DwarfCompileUnitID = CUIndex;
438     }
439     void setMCLineTableCompilationDir(unsigned CUID, StringRef CompilationDir) {
440       getMCDwarfLineTable(CUID).setCompilationDir(CompilationDir);
441     }
442
443     /// Saves the information from the currently parsed dwarf .loc directive
444     /// and sets DwarfLocSeen.  When the next instruction is assembled an entry
445     /// in the line number table with this information and the address of the
446     /// instruction will be created.
447     void setCurrentDwarfLoc(unsigned FileNum, unsigned Line, unsigned Column,
448                             unsigned Flags, unsigned Isa,
449                             unsigned Discriminator) {
450       CurrentDwarfLoc.setFileNum(FileNum);
451       CurrentDwarfLoc.setLine(Line);
452       CurrentDwarfLoc.setColumn(Column);
453       CurrentDwarfLoc.setFlags(Flags);
454       CurrentDwarfLoc.setIsa(Isa);
455       CurrentDwarfLoc.setDiscriminator(Discriminator);
456       DwarfLocSeen = true;
457     }
458     void clearDwarfLocSeen() { DwarfLocSeen = false; }
459
460     bool getDwarfLocSeen() { return DwarfLocSeen; }
461     const MCDwarfLoc &getCurrentDwarfLoc() { return CurrentDwarfLoc; }
462
463     bool getGenDwarfForAssembly() { return GenDwarfForAssembly; }
464     void setGenDwarfForAssembly(bool Value) { GenDwarfForAssembly = Value; }
465     unsigned getGenDwarfFileNumber() { return GenDwarfFileNumber; }
466     void setGenDwarfFileNumber(unsigned FileNumber) {
467       GenDwarfFileNumber = FileNumber;
468     }
469     const SetVector<MCSection *> &getGenDwarfSectionSyms() {
470       return SectionsForRanges;
471     }
472     bool addGenDwarfSection(MCSection *Sec) {
473       return SectionsForRanges.insert(Sec);
474     }
475
476     void finalizeDwarfSections(MCStreamer &MCOS);
477     const std::vector<MCGenDwarfLabelEntry> &getMCGenDwarfLabelEntries() const {
478       return MCGenDwarfLabelEntries;
479     }
480     void addMCGenDwarfLabelEntry(const MCGenDwarfLabelEntry &E) {
481       MCGenDwarfLabelEntries.push_back(E);
482     }
483
484     void setDwarfDebugFlags(StringRef S) { DwarfDebugFlags = S; }
485     StringRef getDwarfDebugFlags() { return DwarfDebugFlags; }
486
487     void setDwarfDebugProducer(StringRef S) { DwarfDebugProducer = S; }
488     StringRef getDwarfDebugProducer() { return DwarfDebugProducer; }
489
490     void setDwarfVersion(uint16_t v) { DwarfVersion = v; }
491     uint16_t getDwarfVersion() const { return DwarfVersion; }
492
493     /// @}
494
495     char *getSecureLogFile() { return SecureLogFile; }
496     raw_ostream *getSecureLog() { return SecureLog; }
497     bool getSecureLogUsed() { return SecureLogUsed; }
498     void setSecureLog(raw_ostream *Value) { SecureLog = Value; }
499     void setSecureLogUsed(bool Value) { SecureLogUsed = Value; }
500
501     void *allocate(unsigned Size, unsigned Align = 8) {
502       return Allocator.Allocate(Size, Align);
503     }
504     void deallocate(void *Ptr) {}
505
506     // Unrecoverable error has occurred. Display the best diagnostic we can
507     // and bail via exit(1). For now, most MC backend errors are unrecoverable.
508     // FIXME: We should really do something about that.
509     LLVM_ATTRIBUTE_NORETURN void reportFatalError(SMLoc L,
510                                                   const Twine &Msg) const;
511   };
512
513 } // end namespace llvm
514
515 // operator new and delete aren't allowed inside namespaces.
516 // The throw specifications are mandated by the standard.
517 /// \brief Placement new for using the MCContext's allocator.
518 ///
519 /// This placement form of operator new uses the MCContext's allocator for
520 /// obtaining memory. It is a non-throwing new, which means that it returns
521 /// null on error. (If that is what the allocator does. The current does, so if
522 /// this ever changes, this operator will have to be changed, too.)
523 /// Usage looks like this (assuming there's an MCContext 'Context' in scope):
524 /// \code
525 /// // Default alignment (8)
526 /// IntegerLiteral *Ex = new (Context) IntegerLiteral(arguments);
527 /// // Specific alignment
528 /// IntegerLiteral *Ex2 = new (Context, 4) IntegerLiteral(arguments);
529 /// \endcode
530 /// Please note that you cannot use delete on the pointer; it must be
531 /// deallocated using an explicit destructor call followed by
532 /// \c Context.Deallocate(Ptr).
533 ///
534 /// \param Bytes The number of bytes to allocate. Calculated by the compiler.
535 /// \param C The MCContext that provides the allocator.
536 /// \param Alignment The alignment of the allocated memory (if the underlying
537 ///                  allocator supports it).
538 /// \return The allocated memory. Could be NULL.
539 inline void *operator new(size_t Bytes, llvm::MCContext &C,
540                           size_t Alignment = 8) throw() {
541   return C.allocate(Bytes, Alignment);
542 }
543 /// \brief Placement delete companion to the new above.
544 ///
545 /// This operator is just a companion to the new above. There is no way of
546 /// invoking it directly; see the new operator for more details. This operator
547 /// is called implicitly by the compiler if a placement new expression using
548 /// the MCContext throws in the object constructor.
549 inline void operator delete(void *Ptr, llvm::MCContext &C, size_t)
550               throw () {
551   C.deallocate(Ptr);
552 }
553
554 /// This placement form of operator new[] uses the MCContext's allocator for
555 /// obtaining memory. It is a non-throwing new[], which means that it returns
556 /// null on error.
557 /// Usage looks like this (assuming there's an MCContext 'Context' in scope):
558 /// \code
559 /// // Default alignment (8)
560 /// char *data = new (Context) char[10];
561 /// // Specific alignment
562 /// char *data = new (Context, 4) char[10];
563 /// \endcode
564 /// Please note that you cannot use delete on the pointer; it must be
565 /// deallocated using an explicit destructor call followed by
566 /// \c Context.Deallocate(Ptr).
567 ///
568 /// \param Bytes The number of bytes to allocate. Calculated by the compiler.
569 /// \param C The MCContext that provides the allocator.
570 /// \param Alignment The alignment of the allocated memory (if the underlying
571 ///                  allocator supports it).
572 /// \return The allocated memory. Could be NULL.
573 inline void *operator new[](size_t Bytes, llvm::MCContext& C,
574                             size_t Alignment = 8) throw() {
575   return C.allocate(Bytes, Alignment);
576 }
577
578 /// \brief Placement delete[] companion to the new[] above.
579 ///
580 /// This operator is just a companion to the new[] above. There is no way of
581 /// invoking it directly; see the new[] operator for more details. This operator
582 /// is called implicitly by the compiler if a placement new[] expression using
583 /// the MCContext throws in the object constructor.
584 inline void operator delete[](void *Ptr, llvm::MCContext &C) throw () {
585   C.deallocate(Ptr);
586 }
587
588 #endif