Browse Source

Update for llvm change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269910 91177308-0d34-0410-b5e6-96231b3b80d8
Rafael Espindola 9 years ago
parent
commit
61e90ae773
2 changed files with 7 additions and 8 deletions
  1. 2 2
      lib/Parse/ParseStmtAsm.cpp
  2. 5 6
      tools/driver/cc1as_main.cpp

+ 2 - 2
lib/Parse/ParseStmtAsm.cpp

@@ -572,8 +572,8 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
 
 
   llvm::SourceMgr TempSrcMgr;
   llvm::SourceMgr TempSrcMgr;
   llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr);
   llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr);
-  MOFI->InitMCObjectFileInfo(TheTriple, llvm::Reloc::Default,
-                             llvm::CodeModel::Default, Ctx);
+  MOFI->InitMCObjectFileInfo(TheTriple, /*PIG*/ false, llvm::CodeModel::Default,
+                             Ctx);
   std::unique_ptr<llvm::MemoryBuffer> Buffer =
   std::unique_ptr<llvm::MemoryBuffer> Buffer =
       llvm::MemoryBuffer::getMemBuffer(AsmString, "<MS inline asm>");
       llvm::MemoryBuffer::getMemBuffer(AsmString, "<MS inline asm>");
 
 

+ 5 - 6
tools/driver/cc1as_main.cpp

@@ -326,19 +326,18 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
 
 
   MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
   MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
 
 
-  llvm::Reloc::Model RM = llvm::Reloc::Default;
+  bool PIC = false;
   if (Opts.RelocationModel == "static") {
   if (Opts.RelocationModel == "static") {
-    RM = llvm::Reloc::Static;
+    PIC = false;
   } else if (Opts.RelocationModel == "pic") {
   } else if (Opts.RelocationModel == "pic") {
-    RM = llvm::Reloc::PIC_;
+    PIC = true;
   } else {
   } else {
     assert(Opts.RelocationModel == "dynamic-no-pic" &&
     assert(Opts.RelocationModel == "dynamic-no-pic" &&
            "Invalid PIC model!");
            "Invalid PIC model!");
-    RM = llvm::Reloc::DynamicNoPIC;
+    PIC = false;
   }
   }
 
 
-  MOFI->InitMCObjectFileInfo(Triple(Opts.Triple), RM,
-                             CodeModel::Default, Ctx);
+  MOFI->InitMCObjectFileInfo(Triple(Opts.Triple), PIC, CodeModel::Default, Ctx);
   if (Opts.SaveTemporaryLabels)
   if (Opts.SaveTemporaryLabels)
     Ctx.setAllowTemporaryLabels(false);
     Ctx.setAllowTemporaryLabels(false);
   if (Opts.GenDwarfForAssembly)
   if (Opts.GenDwarfForAssembly)