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