@@ -2038,30 +2038,28 @@ class ClangShellCommand : public ExternalCommand {
20382038 ClangShellCommand* command)
20392039 : ti(ti), command(command) {}
20402040
2041- virtual void error (const char * message, uint64_t position) override {
2041+ virtual void error (StringRef message, uint64_t position) override {
20422042 getBuildSystem (ti).getDelegate ().commandHadError (command,
20432043 " error reading dependency file '" + command->depsPath +
2044- " ': " + std::string ( message));
2044+ " ': " + message. str ( ));
20452045 ++numErrors;
20462046 }
20472047
2048- virtual void actOnRuleDependency (const char * dependency,
2049- uint64_t length,
2050- const StringRef unescapedWord) override {
2048+ virtual void actOnRuleDependency (StringRef dependency,
2049+ StringRef unescapedWord) override {
20512050 ti.discoveredDependency (BuildKey::makeNode (unescapedWord).toData ());
20522051 getBuildSystem (ti).getDelegate ().commandFoundDiscoveredDependency (command, unescapedWord,
20532052 DiscoveredDependencyKind::Input);
20542053 }
20552054
2056- virtual void actOnRuleStart (const char * name, uint64_t length ,
2057- const StringRef unescapedWord) override {}
2055+ virtual void actOnRuleStart (StringRef name,
2056+ StringRef unescapedWord) override {}
20582057
20592058 virtual void actOnRuleEnd () override {}
20602059 };
20612060
20622061 DepsActions actions (ti, this );
2063- core::MakefileDepsParser (input->getBufferStart (), input->getBufferSize (),
2064- actions).parse ();
2062+ core::MakefileDepsParser (input->getBuffer (), actions).parse ();
20652063 return actions.numErrors == 0 ;
20662064 }
20672065
@@ -2604,16 +2602,15 @@ class SwiftCompilerShellCommand : public ExternalCommand {
26042602 StringRef depsPath, Command* command)
26052603 : ti(ti), depsPath(depsPath) {}
26062604
2607- virtual void error (const char * message, uint64_t position) override {
2605+ virtual void error (StringRef message, uint64_t position) override {
26082606 getBuildSystem (ti).getDelegate ().commandHadError (command,
26092607 " error reading dependency file '" + depsPath.str () +
2610- " ': " + std::string ( message));
2608+ " ': " + message. str ( ));
26112609 ++numErrors;
26122610 }
26132611
2614- virtual void actOnRuleDependency (const char * dependency,
2615- uint64_t length,
2616- const StringRef unescapedWord) override {
2612+ virtual void actOnRuleDependency (StringRef dependency,
2613+ StringRef unescapedWord) override {
26172614 // Only process dependencies for the first rule (the output file), the
26182615 // rest are identical.
26192616 if (ruleNumber == 0 ) {
@@ -2623,17 +2620,16 @@ class SwiftCompilerShellCommand : public ExternalCommand {
26232620 }
26242621 }
26252622
2626- virtual void actOnRuleStart (const char * name, uint64_t length ,
2627- const StringRef unescapedWord) override {}
2623+ virtual void actOnRuleStart (StringRef name,
2624+ StringRef unescapedWord) override {}
26282625
26292626 virtual void actOnRuleEnd () override {
26302627 ++ruleNumber;
26312628 }
26322629 };
26332630
26342631 DepsActions actions (ti, depsPath, this );
2635- core::MakefileDepsParser (input->getBufferStart (), input->getBufferSize (),
2636- actions).parse ();
2632+ core::MakefileDepsParser (input->getBuffer (), actions).parse ();
26372633 return actions.numErrors == 0 ;
26382634 }
26392635
0 commit comments