[PATCH] D16213: [MD] Provide an MCTargetOptions to implementors of MCAsmBackendCtorTy, NFC

Joel Jones via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 09:09:28 PST 2016


joelkevinjones added a comment.

I've made the necessary change to clang and put it in:

http://reviews.llvm.org/D16538


================
Comment at: tools/dsymutil/DwarfLinker.cpp:599
@@ -598,2 +598,3 @@
 
-  MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "");
+  MCTargetOptions Options;
+  MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "", Options);
----------------
dsanders wrote:
> Does it matter that we don't initialize the ABI name here? I don't think it does but I thought I ought to double check.
It shouldn't matter. The `MCTargetOptions` default constructor implicitly uses the `std::string` default constructor by using "`ABIName()`" in its member initializer list.

================
Comment at: tools/llvm-dwp/llvm-dwp.cpp:385-386
@@ -384,3 +384,4 @@
 
-  auto MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "");
+  MCTargetOptions Options;
+  auto MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "", Options);
   if (!MAB)
----------------
dsanders wrote:
> Does it matter that we don't initialize the ABI name here? I don't think it does but I thought I ought to double check.
It shouldn't matter. The `MCTargetOptions` default constructor implicitly uses the `std::string` default constructor by using "`ABIName()`" in its member initializer list.


http://reviews.llvm.org/D16213





More information about the llvm-commits mailing list