There are three reduplicate error messages for different conditions. I
add meaningful information to make them more informative.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/MC/LoongArch/Relocations/fixups-diagnostics.s | ||
---|---|---|
1 | Seems you are using an old code base. |
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp | ||
---|---|---|
98 | Should be "bits" or something else? |
llvm/test/MC/LoongArch/Relocations/fixups-diagnostics.s | ||
---|---|---|
1 | Yes, I rebased code. |
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp | ||
---|---|---|
98 | You can define a method to return a string fixup value out of range [-xxx, xxx] |
Comment Actions
I defined a method named "reportOutOfRangeError" to report "out of range" error. Thanks!
llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp | ||
---|---|---|
82 | The function just uses the Location, so a SMLoc parameter is more appropriate. |
Remove the two variables. Use llvm::minIntN(N) and llvm::maxIntN(N) in `Twine.