diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 17:23:21 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 20:01:37 +0100 |
commit | 8dc7b982b4556c243e0502e6e230bdd53ddd65ff (patch) | |
tree | 518a39bbece25299e56350272605c7a9bd8f60c6 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
download | bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip |
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71857
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index ee9d388131f..4b825c7af07 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -273,7 +273,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer, Streamer.SwitchSection(S); - for (const auto &Operand : LinkerOptions->operands()) { + for (const auto *Operand : LinkerOptions->operands()) { if (cast<MDNode>(Operand)->getNumOperands() != 2) report_fatal_error("invalid llvm.linker.options"); for (const auto &Option : cast<MDNode>(Operand)->operands()) { @@ -289,7 +289,7 @@ void TargetLoweringObjectFileELF::emitModuleMetadata(MCStreamer &Streamer, Streamer.SwitchSection(S); - for (const auto &Operand : DependentLibraries->operands()) { + for (const auto *Operand : DependentLibraries->operands()) { Streamer.EmitBytes( cast<MDString>(cast<MDNode>(Operand)->getOperand(0))->getString()); Streamer.EmitIntValue(0, 1); @@ -885,7 +885,7 @@ void TargetLoweringObjectFileMachO::emitModuleMetadata(MCStreamer &Streamer, Module &M) const { // Emit the linker options if present. if (auto *LinkerOptions = M.getNamedMetadata("llvm.linker.options")) { - for (const auto &Option : LinkerOptions->operands()) { + for (const auto *Option : LinkerOptions->operands()) { SmallVector<std::string, 4> StrOptions; for (const auto &Piece : cast<MDNode>(Option)->operands()) StrOptions.push_back(cast<MDString>(Piece)->getString()); @@ -1449,7 +1449,7 @@ void TargetLoweringObjectFileCOFF::emitModuleMetadata(MCStreamer &Streamer, // linker. MCSection *Sec = getDrectveSection(); Streamer.SwitchSection(Sec); - for (const auto &Option : LinkerOptions->operands()) { + for (const auto *Option : LinkerOptions->operands()) { for (const auto &Piece : cast<MDNode>(Option)->operands()) { // Lead with a space for consistency with our dllexport implementation. std::string Directive(" "); |