forked from OSchip/llvm-project
![]() This is a fix for r339314. MCInstBuilder uses the named parameter idiom and an 'operator MCInst&' to ease the creation of MCInsts. As the object of MCInstBuilder owns the MCInst is manipulating, the lifetime of the MCInst is bound to that of MCInstBuilder. In r339314 I bound a reference to the MCInst in an initializer. The temporary of MCInstBuilder (and also its MCInst) is destroyed at the end of the declaration leading to a dangling reference. Fix this by using MCInstBuilder inside an argument of a function call. Temporaries in function calls are destroyed in the enclosing full expression, so the the reference to MCInst is still valid when emitToStreamer executes. llvm-svn: 339654 |
||
---|---|---|
.. | ||
AsmParser | ||
Disassembler | ||
InstPrinter | ||
MCTargetDesc | ||
TargetInfo | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
RISCV.h | ||
RISCV.td | ||
RISCVAsmPrinter.cpp | ||
RISCVCallingConv.td | ||
RISCVFrameLowering.cpp | ||
RISCVFrameLowering.h | ||
RISCVISelDAGToDAG.cpp | ||
RISCVISelLowering.cpp | ||
RISCVISelLowering.h | ||
RISCVInstrFormats.td | ||
RISCVInstrFormatsC.td | ||
RISCVInstrInfo.cpp | ||
RISCVInstrInfo.h | ||
RISCVInstrInfo.td | ||
RISCVInstrInfoA.td | ||
RISCVInstrInfoC.td | ||
RISCVInstrInfoD.td | ||
RISCVInstrInfoF.td | ||
RISCVInstrInfoM.td | ||
RISCVMCInstLower.cpp | ||
RISCVMachineFunctionInfo.h | ||
RISCVMergeBaseOffset.cpp | ||
RISCVRegisterInfo.cpp | ||
RISCVRegisterInfo.h | ||
RISCVRegisterInfo.td | ||
RISCVSubtarget.cpp | ||
RISCVSubtarget.h | ||
RISCVTargetMachine.cpp | ||
RISCVTargetMachine.h | ||
RISCVTargetObjectFile.cpp | ||
RISCVTargetObjectFile.h |