[PATCH] Make it possible for ints/floats to return different values from getBooleanContents()

Daniel Sanders daniel.sanders at imgtec.com
Wed Jul 9 13:04:52 PDT 2014

Comment at: include/llvm/Target/TargetLowering.h:974
@@ -956,1 +973,3 @@
+  /// See getBooleanContents.
+  void setBooleanFloatContents(BooleanContent Ty) { BooleanFloatContents = Ty; }
hfinkel at anl.gov wrote:
> I'd really prefer that you do this as I suggested:
> void setBooleanContents(BooleanContent Ty) { BooleanContents = Ty; BooleanFloatContents = Ty; }
> void setBooleanContents(BooleanContent Ty, BooleanContent FTy) { BooleanContents = Ty; BooleanFloatContents = FTy; }
> The reason is that, as you've implemented it, the order in which you call setBooleanContents and setBooleanFloatContents matters, and I think that will prove confusing.
Sorry, I'm trying to do a couple things in parallel at the moment and I didn't notice that it was an overloaded function. I agree that the overloaded function approach is better because it's harder to make mistakes. I'll do another update to switch to your suggestion.


More information about the llvm-commits mailing list