X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FAsmWriter.h;h=cebfca53e7485bc42f55af7e26b8b98e9418ac15;hb=fd0a8133e56e6c48d04e395290da69c3926a48d1;hp=9e8355719a7cf575d24f67052dc5dc179c8e3863;hpb=15f387c93ef8d5c23f110143996c8b9b4a089864;p=oota-llvm.git diff --git a/lib/IR/AsmWriter.h b/lib/IR/AsmWriter.h index 9e8355719a7..cebfca53e74 100644 --- a/lib/IR/AsmWriter.h +++ b/lib/IR/AsmWriter.h @@ -12,11 +12,11 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_IR_ASSEMBLYWRITER_H -#define LLVM_IR_ASSEMBLYWRITER_H +#ifndef LLVM_LIB_IR_ASMWRITER_H +#define LLVM_LIB_IR_ASMWRITER_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/SetVector.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/TypeFinder.h" @@ -27,6 +27,7 @@ namespace llvm { class BasicBlock; class Function; class GlobalValue; +class Comdat; class Module; class NamedMDNode; class Value; @@ -39,7 +40,7 @@ SlotTracker *createSlotTracker(const Module *M); // TypePrinting Class: Type printing machinery //===----------------------------------------------------------------------===// -class LLVM_LIBRARY_VISIBILITY TypePrinting { +class TypePrinting { TypePrinting(const TypePrinting &) LLVM_DELETED_FUNCTION; void operator=(const TypePrinting&) LLVM_DELETED_FUNCTION; public: @@ -61,16 +62,17 @@ public: void printStructBody(StructType *Ty, raw_ostream &OS); }; -class LLVM_LIBRARY_VISIBILITY AssemblyWriter { +class AssemblyWriter { protected: formatted_raw_ostream &Out; const Module *TheModule; private: - OwningPtr ModuleSlotTracker; + std::unique_ptr ModuleSlotTracker; SlotTracker &Machine; TypePrinting TypePrinter; AssemblyAnnotationWriter *AnnotationWriter; + SetVector Comdats; public: /// Construct an AssemblyWriter with an external SlotTracker @@ -91,6 +93,9 @@ public: void writeOperand(const Value *Op, bool PrintType); void writeParamOperand(const Value *Operand, AttributeSet Attrs,unsigned Idx); void writeAtomic(AtomicOrdering Ordering, SynchronizationScope SynchScope); + void writeAtomicCmpXchg(AtomicOrdering SuccessOrdering, + AtomicOrdering FailureOrdering, + SynchronizationScope SynchScope); void writeAllMDNodes(); void writeMDNode(unsigned Slot, const MDNode *Node); @@ -99,6 +104,7 @@ public: void printTypeIdentities(); void printGlobal(const GlobalVariable *GV); void printAlias(const GlobalAlias *GV); + void printComdat(const Comdat *C); void printFunction(const Function *F); void printArgument(const Argument *FA, AttributeSet Attrs, unsigned Idx); void printBasicBlock(const BasicBlock *BB); @@ -115,4 +121,4 @@ private: } // namespace llvm -#endif //LLVM_IR_ASMWRITER_H +#endif