[PATCH] D27326: Make a DWARF generator so we can unit test DWARF APIs with gtest.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 17:47:07 PST 2016


clayborg added a comment.

Added an inline comment about triples required to created the dwarfgen::Generator since it requires us to use the triple to get all the right classes for the AsmPrinter and all the associated classes that go with it.



================
Comment at: unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:63-66
+  if (AddrSize == 8)
+    Triple = llvm::Triple("x86_64--");
+  else
+    Triple = llvm::Triple("i386--");
----------------
Is there a better way to ensure we get a 32 and 64 bit target we can use for generating DWARF? This is my only issue with the patch that I know of. This triple code is repeated 3 times in this file. What happens if we aren't able to get these architectures?


https://reviews.llvm.org/D27326





More information about the llvm-commits mailing list