[PATCH] MS ABI: Implement x86_64 RTTI
David Majnemer
david.majnemer at gmail.com
Sun Jun 15 12:51:02 PDT 2014
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
More information about the cfe-commits
mailing list