diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-06-08 20:16:21 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-06-08 20:16:21 +0000 |
| commit | 38a284166505b901d0b5733ea449e5a331b2094c (patch) | |
| tree | 0304639bf25e781c99ef484f7f53083e01e6914b | |
| parent | e2a428bad768ba4d60de28bd7ad8864fe111e891 (diff) | |
| download | bcm5719-llvm-38a284166505b901d0b5733ea449e5a331b2094c.tar.gz bcm5719-llvm-38a284166505b901d0b5733ea449e5a331b2094c.zip | |
Use LLVM_FALLTHROUGH.
llvm-svn: 305010
| -rw-r--r-- | lld/ELF/InputSection.cpp | 3 | ||||
| -rw-r--r-- | lld/ELF/Target.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 4af05c1a187..18064cad9f3 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -20,6 +20,7 @@ #include "Target.h" #include "Thunks.h" #include "llvm/Object/Decompressor.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/Compression.h" #include "llvm/Support/Endian.h" #include "llvm/Support/Path.h" @@ -682,7 +683,7 @@ void InputSectionBase::relocateAlloc(uint8_t *Buf, uint8_t *BufEnd) { // Patch a nop (0x60000000) to a ld. if (BufLoc + 8 <= BufEnd && read32be(BufLoc + 4) == 0x60000000) write32be(BufLoc + 4, 0xe8410028); // ld %r2, 40(%r1) - // fallthrough + LLVM_FALLTHROUGH; default: Target->relocateOne(BufLoc, Type, TargetVA); break; diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index 6f076998b03..d1affbb6640 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -2085,7 +2085,7 @@ RelExpr MipsTargetInfo<ELFT>::getRelExpr(uint32_t Type, const SymbolBody &S, return R_MIPS_GOT_GP_PC; if (&S == ElfSym::MipsLocalGp) return R_MIPS_GOT_GP; - // fallthrough + LLVM_FALLTHROUGH; case R_MIPS_GOT_OFST: return R_ABS; case R_MIPS_PC32: @@ -2099,7 +2099,7 @@ RelExpr MipsTargetInfo<ELFT>::getRelExpr(uint32_t Type, const SymbolBody &S, case R_MIPS_GOT16: if (S.isLocal()) return R_MIPS_GOT_LOCAL_PAGE; - // fallthrough + LLVM_FALLTHROUGH; case R_MIPS_CALL16: case R_MIPS_GOT_DISP: case R_MIPS_TLS_GOTTPREL: @@ -2353,7 +2353,7 @@ void MipsTargetInfo<ELFT>::relocateOne(uint8_t *Loc, uint32_t Type, case R_MIPS_TLS_GD: case R_MIPS_TLS_LDM: checkInt<16>(Loc, Val, Type); - // fallthrough + LLVM_FALLTHROUGH; case R_MIPS_CALL16: case R_MIPS_CALL_LO16: case R_MIPS_GOT_LO16: |

