summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp')
-rw-r--r--contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp b/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp
index 37515d9..94aa70e 100644
--- a/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp
+++ b/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp
@@ -37,7 +37,7 @@ class DarwinAsmParser : public MCAsmParserExtension {
getParser().addDirectiveHandler(Directive, Handler);
}
- bool parseSectionSwitch(const char *Segment, const char *Section,
+ bool parseSectionSwitch(StringRef Segment, StringRef Section,
unsigned TAA = 0, unsigned ImplicitAlign = 0,
unsigned StubSize = 0);
@@ -389,8 +389,7 @@ public:
} // end anonymous namespace
-bool DarwinAsmParser::parseSectionSwitch(const char *Segment,
- const char *Section,
+bool DarwinAsmParser::parseSectionSwitch(StringRef Segment, StringRef Section,
unsigned TAA, unsigned Align,
unsigned StubSize) {
if (getLexer().isNot(AsmToken::EndOfStatement))
@@ -469,8 +468,8 @@ bool DarwinAsmParser::parseDirectiveDesc(StringRef, SMLoc) {
/// parseDirectiveIndirectSymbol
/// ::= .indirect_symbol identifier
bool DarwinAsmParser::parseDirectiveIndirectSymbol(StringRef, SMLoc Loc) {
- const MCSectionMachO *Current = static_cast<const MCSectionMachO*>(
- getStreamer().getCurrentSection().first);
+ const MCSectionMachO *Current = static_cast<const MCSectionMachO *>(
+ getStreamer().getCurrentSectionOnly());
MachO::SectionType SectionType = Current->getType();
if (SectionType != MachO::S_NON_LAZY_SYMBOL_POINTERS &&
SectionType != MachO::S_LAZY_SYMBOL_POINTERS &&
@@ -615,7 +614,7 @@ bool DarwinAsmParser::parseDirectiveSection(StringRef, SMLoc) {
TAA, TAAParsed, StubSize);
if (!ErrorStr.empty())
- return Error(Loc, ErrorStr.c_str());
+ return Error(Loc, ErrorStr);
// Issue a warning if the target is not powerpc and Section is a *coal* section.
Triple TT = getParser().getContext().getObjectFileInfo()->getTargetTriple();
@@ -700,7 +699,7 @@ bool DarwinAsmParser::parseDirectiveSecureLogUnique(StringRef, SMLoc IDLoc) {
if (!OS) {
std::error_code EC;
auto NewOS = llvm::make_unique<raw_fd_ostream>(
- SecureLogFile, EC, sys::fs::F_Append | sys::fs::F_Text);
+ StringRef(SecureLogFile), EC, sys::fs::F_Append | sys::fs::F_Text);
if (EC)
return Error(IDLoc, Twine("can't open secure log file: ") +
SecureLogFile + " (" + EC.message() + ")");
OpenPOWER on IntegriCloud