[PATCH] D57376: X86Parser: Fix potential reference to deleted object
Brandon Jones via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 05:47:20 PST 2019
BrandonTJones updated this revision to Diff 184069.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57376/new/
https://reviews.llvm.org/D57376
Files:
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Index: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -2939,13 +2939,13 @@
uint64_t &ErrorInfo,
bool MatchingInlineAsm) {
assert(!Operands.empty() && "Unexpect empty operand list!");
- X86Operand &Op = static_cast<X86Operand &>(*Operands[0]);
- assert(Op.isToken() && "Leading operand should always be a mnemonic!");
+ assert((*Operands[0]).isToken() && "Leading operand should always be a mnemonic!");
SMRange EmptyRange = None;
// First, handle aliases that expand to multiple instructions.
- MatchFPUWaitAlias(IDLoc, Op, Operands, Out, MatchingInlineAsm);
-
+ MatchFPUWaitAlias(IDLoc, static_cast<X86Operand &>(*Operands[0]);
+ , Operands, Out, MatchingInlineAsm);
+ X86Operand &Op = static_cast<X86Operand &>(*Operands[0]);
bool WasOriginallyInvalidOperand = false;
unsigned Prefixes = getPrefixes(Operands);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57376.184069.patch
Type: text/x-patch
Size: 1124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190129/22ec71c1/attachment.bin>
More information about the llvm-commits
mailing list