Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AVR/AVRAsmPrinter.cpp | ||
---|---|---|
113 | We should not use assert here, since the case we checked is user illegal input, it would be better to return true and let the llvm framework to give the error message. And I combine the check with the above if check. |
Though the title is refactor, actually the part of handling extra code is left unchanged. I only make the high run flow more clear.
llvm/lib/Target/AVR/AVRAsmPrinter.cpp | ||
---|---|---|
112 | These conditions are checked in https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AVR/inline-asm/inline-asm-invalid.ll But I can not compose tests for the following two cases:
|
llvm/lib/Target/AVR/AVRAsmPrinter.cpp | ||
---|---|---|
111 | It seems that ExtraCode[0] < 'A' || ExtraCode[0] > 'Z' will return false according to the original logic ? |
llvm/lib/Target/AVR/AVRAsmPrinter.cpp | ||
---|---|---|
111 | The orginal logic is wrong. Returning false means success, while true means failure. This is the logic of https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/AsmPrinter.h#L787 |
We should not use assert here, since the case we checked is user illegal input, it would be better to return true and let the llvm framework to give the error message.
And I combine the check with the above if check.