X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FLinker%2FLinker.h;h=3a6df80aa38d18136f4bedbf64a38f9652dea65e;hp=2a46d755b8e060c7a0bffea8076f333ee85c3d28;hb=20264d6c67012f8097b7602c267859ed88c697ff;hpb=70b9edea776cdaf029b1341589b77cf7cfa69879 diff --git a/include/llvm/Linker/Linker.h b/include/llvm/Linker/Linker.h index 2a46d755b8e..3a6df80aa38 100644 --- a/include/llvm/Linker/Linker.h +++ b/include/llvm/Linker/Linker.h @@ -60,6 +60,13 @@ public: bool hasType(StructType *Ty); }; + enum Flags { + None = 0, + OverrideFromSrc = (1 << 0), + LinkOnlyNeeded = (1 << 1), + InternalizeLinkedSymbols = (1 << 2) + }; + Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler); Linker(Module *M); @@ -70,15 +77,17 @@ public: /// Passing OverrideSymbols as true will have symbols from Src /// shadow those in the Dest. /// Returns true on error. - bool linkInModule(Module *Src, bool OverrideSymbols = false); + bool linkInModule(Module *Src, unsigned Flags = Flags::None); /// \brief Set the composite to the passed-in module. void setModule(Module *Dst); static bool LinkModules(Module *Dest, Module *Src, - DiagnosticHandlerFunction DiagnosticHandler); + DiagnosticHandlerFunction DiagnosticHandler, + unsigned Flags = Flags::None); - static bool LinkModules(Module *Dest, Module *Src); + static bool LinkModules(Module *Dest, Module *Src, + unsigned Flags = Flags::None); private: void init(Module *M, DiagnosticHandlerFunction DiagnosticHandler);