forked from OSchip/llvm-project
[NFC] Fix warnings when building with clang
Summary: Fix switch-cases that don't handle all MCCFIInstruction enumeration types. Fix range-loop iterator forced copy. (cherry picked from FBD31068505)
This commit is contained in:
parent
47ce9b39e4
commit
1ca3a8b824
|
@ -2514,6 +2514,7 @@ private:
|
|||
case MCCFIInstruction::OpAdjustCfaOffset:
|
||||
case MCCFIInstruction::OpWindowSave:
|
||||
case MCCFIInstruction::OpNegateRAState:
|
||||
case MCCFIInstruction::OpLLVMDefAspaceCfa:
|
||||
llvm_unreachable("unsupported CFI opcode");
|
||||
break;
|
||||
case MCCFIInstruction::OpRememberState:
|
||||
|
@ -2652,6 +2653,7 @@ struct CFISnapshotDiff : public CFISnapshot {
|
|||
case MCCFIInstruction::OpAdjustCfaOffset:
|
||||
case MCCFIInstruction::OpWindowSave:
|
||||
case MCCFIInstruction::OpNegateRAState:
|
||||
case MCCFIInstruction::OpLLVMDefAspaceCfa:
|
||||
llvm_unreachable("unsupported CFI opcode");
|
||||
return false;
|
||||
case MCCFIInstruction::OpRememberState:
|
||||
|
@ -2800,6 +2802,7 @@ BinaryFunction::unwindCFIState(int32_t FromState, int32_t ToState,
|
|||
case MCCFIInstruction::OpAdjustCfaOffset:
|
||||
case MCCFIInstruction::OpWindowSave:
|
||||
case MCCFIInstruction::OpNegateRAState:
|
||||
case MCCFIInstruction::OpLLVMDefAspaceCfa:
|
||||
llvm_unreachable("unsupported CFI opcode");
|
||||
break;
|
||||
case MCCFIInstruction::OpGnuArgsSize:
|
||||
|
|
|
@ -124,10 +124,9 @@ public:
|
|||
/// and BB offsets where intructions of these opcodes occur.
|
||||
using MaxOpcodeHistogramTy =
|
||||
std::multimap<uint64_t, std::pair<StringRef, uint32_t>>;
|
||||
using OpcodeStatTy =
|
||||
std::pair<unsigned, std::pair<uint64_t, MaxOpcodeHistogramTy>>;
|
||||
using OpcodeHistogramTy =
|
||||
std::unordered_map<unsigned, std::pair<uint64_t, MaxOpcodeHistogramTy>>;
|
||||
using OpcodeStatTy = OpcodeHistogramTy::value_type;
|
||||
|
||||
OpcodeHistogramTy OpcodeHistogram;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue