diff options
Diffstat (limited to 'llvm/lib/MC/MCParser/MasmParser.cpp')
| -rw-r--r-- | llvm/lib/MC/MCParser/MasmParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp index 51563ea86a6c..67f35409244f 100644 --- a/llvm/lib/MC/MCParser/MasmParser.cpp +++ b/llvm/lib/MC/MCParser/MasmParser.cpp @@ -1421,11 +1421,12 @@ bool MasmParser::Run(bool NoInitialTextSection, bool NoFinalize) { if (!NoFinalize) { if (MAI.hasSubsectionsViaSymbols()) { for (const auto &TableEntry : getContext().getSymbols()) { - MCSymbol *Sym = TableEntry.getValue(); + MCSymbol *Sym = TableEntry.getValue().Symbol; // Variable symbols may not be marked as defined, so check those // explicitly. If we know it's a variable, we have a definition for // the purposes of this check. - if (Sym->isTemporary() && !Sym->isVariable() && !Sym->isDefined()) + if (Sym && Sym->isTemporary() && !Sym->isVariable() && + !Sym->isDefined()) // FIXME: We would really like to refer back to where the symbol was // first referenced for a source location. We need to add something // to track that. Currently, we just point to the end of the file. @@ -7443,8 +7444,7 @@ bool MasmParser::parseMSInlineAsm( // Set the unique clobbers. array_pod_sort(ClobberRegs.begin(), ClobberRegs.end()); - ClobberRegs.erase(std::unique(ClobberRegs.begin(), ClobberRegs.end()), - ClobberRegs.end()); + ClobberRegs.erase(llvm::unique(ClobberRegs), ClobberRegs.end()); Clobbers.assign(ClobberRegs.size(), std::string()); for (unsigned I = 0, E = ClobberRegs.size(); I != E; ++I) { raw_string_ostream OS(Clobbers[I]); |
