[PATCH] D20503: [AVR] Add AVRMCExpr

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 24 07:34:05 PDT 2016


kparzysz added a subscriber: kparzysz.

================
Comment at: lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp:100
@@ +99,3 @@
+  if (Negated)
+    v *= -1;
+
----------------
This should happen before you convert it to an unsigned value.

================
Comment at: lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp:131
@@ +130,3 @@
+AVR::Fixups AVRMCExpr::getFixupKind() const {
+  auto kind = AVR::Fixups(-1);
+
----------------
"AVR::Fixups Kind = AVR::Fixups::LastTargetFixupKind" would be better to indicate an invalid value.

Also, variable names generally start with an upper case.


https://reviews.llvm.org/D20503





More information about the llvm-commits mailing list