From 280c2a6355828391ec3cbe4c94327f4335f43eae Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Wed, 5 Oct 2016 01:02:22 +0000 Subject: [PATCH] Use StringRef in DarwinAsmParser (NFC) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283283 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCParser/DarwinAsmParser.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/MC/MCParser/DarwinAsmParser.cpp b/lib/MC/MCParser/DarwinAsmParser.cpp index 37515d9c074..063b4a6f895 100644 --- a/lib/MC/MCParser/DarwinAsmParser.cpp +++ b/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)) @@ -700,7 +699,7 @@ bool DarwinAsmParser::parseDirectiveSecureLogUnique(StringRef, SMLoc IDLoc) { if (!OS) { std::error_code EC; auto NewOS = llvm::make_unique( - 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() + ")"); -- 2.11.0