[lld] r244856 - Update for llvm api change.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 18:07:08 PDT 2015


Author: rafael
Date: Wed Aug 12 20:07:08 2015
New Revision: 244856

URL: http://llvm.org/viewvc/llvm-project?rev=244856&view=rev
Log:
Update for llvm api change.

Modified:
    lld/trunk/COFF/Driver.h
    lld/trunk/COFF/DriverUtils.cpp
    lld/trunk/COFF/InputFiles.cpp
    lld/trunk/COFF/InputFiles.h
    lld/trunk/COFF/ModuleDef.cpp
    lld/trunk/lib/Driver/GnuLdDriver.cpp

Modified: lld/trunk/COFF/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.h?rev=244856&r1=244855&r2=244856&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.h (original)
+++ lld/trunk/COFF/Driver.h Wed Aug 12 20:07:08 2015
@@ -56,7 +56,7 @@ private:
   std::vector<const char *> replaceResponseFiles(std::vector<const char *>);
 
   llvm::BumpPtrAllocator AllocAux;
-  llvm::BumpPtrStringSaver Alloc;
+  llvm::StringSaver Alloc;
 };
 
 class LinkerDriver {
@@ -69,7 +69,7 @@ public:
 
 private:
   llvm::BumpPtrAllocator AllocAux;
-  llvm::BumpPtrStringSaver Alloc;
+  llvm::StringSaver Alloc;
   ArgParser Parser;
   SymbolTable Symtab;
 
@@ -107,7 +107,7 @@ private:
   std::vector<std::unique_ptr<MemoryBuffer>> OwningMBs;
 };
 
-void parseModuleDefs(MemoryBufferRef MB, llvm::BumpPtrStringSaver *Alloc);
+void parseModuleDefs(MemoryBufferRef MB, llvm::StringSaver *Alloc);
 void writeImportLibrary();
 
 // Functions below this line are defined in DriverUtils.cpp.

Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=244856&r1=244855&r2=244856&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Wed Aug 12 20:07:08 2015
@@ -66,7 +66,7 @@ public:
 
 private:
   llvm::BumpPtrAllocator Alloc;
-  llvm::BumpPtrStringSaver Saver;
+  llvm::StringSaver Saver;
   StringRef Prog;
   std::vector<const char *> Args;
 };
@@ -583,7 +583,7 @@ llvm::opt::InputArgList ArgParser::parse
 
 std::vector<const char *> ArgParser::tokenize(StringRef S) {
   SmallVector<const char *, 16> Tokens;
-  BumpPtrStringSaver Saver(AllocAux);
+  StringSaver Saver(AllocAux);
   llvm::cl::TokenizeWindowsCommandLine(S, Saver, Tokens);
   return std::vector<const char *>(Tokens.begin(), Tokens.end());
 }
@@ -593,7 +593,7 @@ std::vector<const char *> ArgParser::tok
 std::vector<const char *>
 ArgParser::replaceResponseFiles(std::vector<const char *> Argv) {
   SmallVector<const char *, 256> Tokens(Argv.data(), Argv.data() + Argv.size());
-  BumpPtrStringSaver Saver(AllocAux);
+  StringSaver Saver(AllocAux);
   ExpandResponseFiles(Saver, TokenizeWindowsCommandLine, Tokens);
   return std::vector<const char *>(Tokens.begin(), Tokens.end());
 }

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=244856&r1=244855&r2=244856&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Wed Aug 12 20:07:08 2015
@@ -318,7 +318,7 @@ void BitcodeFile::parse() {
   if (!Err.empty())
     error(Err);
 
-  llvm::BumpPtrStringSaver Saver(Alloc);
+  llvm::StringSaver Saver(Alloc);
   for (unsigned I = 0, E = M->getSymbolCount(); I != E; ++I) {
     lto_symbol_attributes Attrs = M->getSymbolAttributes(I);
     if ((Attrs & LTO_SYMBOL_SCOPE_MASK) == LTO_SYMBOL_SCOPE_INTERNAL)

Modified: lld/trunk/COFF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.h?rev=244856&r1=244855&r2=244856&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.h (original)
+++ lld/trunk/COFF/InputFiles.h Wed Aug 12 20:07:08 2015
@@ -188,7 +188,7 @@ private:
   std::vector<SymbolBody *> SymbolBodies;
   llvm::BumpPtrAllocator Alloc;
   llvm::BumpPtrAllocator StringAllocAux;
-  llvm::BumpPtrStringSaver StringAlloc;
+  llvm::StringSaver StringAlloc;
 };
 
 // Used for LTO.

Modified: lld/trunk/COFF/ModuleDef.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/ModuleDef.cpp?rev=244856&r1=244855&r2=244856&view=diff
==============================================================================
--- lld/trunk/COFF/ModuleDef.cpp (original)
+++ lld/trunk/COFF/ModuleDef.cpp Wed Aug 12 20:07:08 2015
@@ -109,7 +109,7 @@ private:
 
 class Parser {
 public:
-  explicit Parser(StringRef S, BumpPtrStringSaver *A) : Lex(S), Alloc(A) {}
+  explicit Parser(StringRef S, StringSaver *A) : Lex(S), Alloc(A) {}
 
   void parse() {
     do {
@@ -270,12 +270,12 @@ private:
   Lexer Lex;
   Token Tok;
   std::vector<Token> Stack;
-  BumpPtrStringSaver *Alloc;
+  StringSaver *Alloc;
 };
 
 } // anonymous namespace
 
-void parseModuleDefs(MemoryBufferRef MB, BumpPtrStringSaver *Alloc) {
+void parseModuleDefs(MemoryBufferRef MB, StringSaver *Alloc) {
   Parser(MB.getBuffer(), Alloc).parse();
 }
 

Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=244856&r1=244855&r2=244856&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Wed Aug 12 20:07:08 2015
@@ -89,7 +89,7 @@ maybeExpandResponseFiles(llvm::ArrayRef<
   SmallVector<const char *, 256> smallvec;
   for (const char *arg : args)
     smallvec.push_back(arg);
-  llvm::BumpPtrStringSaver saver(alloc);
+  llvm::StringSaver saver(alloc);
   llvm::cl::ExpandResponseFiles(saver, llvm::cl::TokenizeGNUCommandLine, smallvec);
 
   // Pack the results to a C-array and return it.




More information about the llvm-commits mailing list