[PATCH] D24317: Emit S_COMPILE3 CodeView record
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 18:05:38 PDT 2016
majnemer added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:530-532
@@ +529,5 @@
+
+struct Version {
+ int Part[4];
+};
+
----------------
This should be in the anonymous namespace.
================
Comment at: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:574-575
@@ +573,4 @@
+ OS.AddComment("CPUType");
+ CPUType CPU =
+ (getPointerSizeInBytes() == 8) ? CPUType::X64 : CPUType::Pentium3;
+ OS.EmitIntValue(static_cast<uint64_t>(CPU), 2);
----------------
majnemer wrote:
> I'd make it a switch on the triple's architecture (`Triple(MMI->getModule()->getTargetTriple()).getArch()`). Clang also supports ARMNT.
>
> I'd have the default label call `report_fatal_error` to indicate that the architecture is not supported.
Ah, looks like we can use 0xFFFF for an unknown machine type (https://github.com/Microsoft/microsoft-pdb/blob/e6b1dec61e154b568357537792e1d17a13525d5d/cvdump/dumpsym7.cpp#L256)
https://reviews.llvm.org/D24317
More information about the llvm-commits
mailing list