[llvm] r283283 - Use StringRef in DarwinAsmParser (NFC)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 18:02:23 PDT 2016
Author: mehdi_amini
Date: Tue Oct 4 20:02:22 2016
New Revision: 283283
URL: http://llvm.org/viewvc/llvm-project?rev=283283&view=rev
Log:
Use StringRef in DarwinAsmParser (NFC)
Modified:
llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
Modified: llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp?rev=283283&r1=283282&r2=283283&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp Tue Oct 4 20:02:22 2016
@@ -37,7 +37,7 @@ class DarwinAsmParser : public MCAsmPars
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::parseDirectiveSecu
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() + ")");
More information about the llvm-commits
mailing list