Yes, I checked the output against x64 CL.

Let me know how you feel about my two inline comments and I'll commit after.

================
Comment at: lib/CodeGen/MicrosoftRTTI.cpp:60
@@ +59,3 @@
+                                        llvm::Type *PtrType) {
+  if (!isImageRelative(CGM))
+    return PtrType;
----------------
Warren Hunt wrote:
> is it more normal do do this this way or use
> return isImageRelative(CGM) ? PtrType : CGM.IntTy;
> ?
I did it this way to mirror `getImageRelativeConstant`.

================
Comment at: lib/CodeGen/MicrosoftRTTI.cpp:156
@@ +155,3 @@
+  };
+  llvm::ArrayRef<llvm::Type *> FieldTypesRef(FieldTypes);
+  if (!isImageRelative(CGM))
----------------
Warren Hunt wrote:
> I assume ArrayRef can take a pointer and a size.  If so I think it would be 
> more reasonable to adjust the input size rather than slicing the result.
I could do something like:
  llvm::ArrayRef<llvm::Type *> FieldTypesRef(
      std::begin(FieldTypes),
      isImageRelative(CGM) ? std::end(FieldTypes) : std::end(FieldTypes) - 1);

http://reviews.llvm.org/D4148



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to