@@ -2038,30 +2038,28 @@ class ClangShellCommand : public ExternalCommand {
2038
2038
ClangShellCommand* command)
2039
2039
: ti(ti), command(command) {}
2040
2040
2041
- virtual void error (const char * message, uint64_t position) override {
2041
+ virtual void error (StringRef message, uint64_t position) override {
2042
2042
getBuildSystem (ti).getDelegate ().commandHadError (command,
2043
2043
" error reading dependency file '" + command->depsPath +
2044
- " ': " + std::string ( message));
2044
+ " ': " + message. str ( ));
2045
2045
++numErrors;
2046
2046
}
2047
2047
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 {
2051
2050
ti.discoveredDependency (BuildKey::makeNode (unescapedWord).toData ());
2052
2051
getBuildSystem (ti).getDelegate ().commandFoundDiscoveredDependency (command, unescapedWord,
2053
2052
DiscoveredDependencyKind::Input);
2054
2053
}
2055
2054
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 {}
2058
2057
2059
2058
virtual void actOnRuleEnd () override {}
2060
2059
};
2061
2060
2062
2061
DepsActions actions (ti, this );
2063
- core::MakefileDepsParser (input->getBufferStart (), input->getBufferSize (),
2064
- actions).parse ();
2062
+ core::MakefileDepsParser (input->getBuffer (), actions).parse ();
2065
2063
return actions.numErrors == 0 ;
2066
2064
}
2067
2065
@@ -2604,16 +2602,15 @@ class SwiftCompilerShellCommand : public ExternalCommand {
2604
2602
StringRef depsPath, Command* command)
2605
2603
: ti(ti), depsPath(depsPath) {}
2606
2604
2607
- virtual void error (const char * message, uint64_t position) override {
2605
+ virtual void error (StringRef message, uint64_t position) override {
2608
2606
getBuildSystem (ti).getDelegate ().commandHadError (command,
2609
2607
" error reading dependency file '" + depsPath.str () +
2610
- " ': " + std::string ( message));
2608
+ " ': " + message. str ( ));
2611
2609
++numErrors;
2612
2610
}
2613
2611
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 {
2617
2614
// Only process dependencies for the first rule (the output file), the
2618
2615
// rest are identical.
2619
2616
if (ruleNumber == 0 ) {
@@ -2623,17 +2620,16 @@ class SwiftCompilerShellCommand : public ExternalCommand {
2623
2620
}
2624
2621
}
2625
2622
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 {}
2628
2625
2629
2626
virtual void actOnRuleEnd () override {
2630
2627
++ruleNumber;
2631
2628
}
2632
2629
};
2633
2630
2634
2631
DepsActions actions (ti, depsPath, this );
2635
- core::MakefileDepsParser (input->getBufferStart (), input->getBufferSize (),
2636
- actions).parse ();
2632
+ core::MakefileDepsParser (input->getBuffer (), actions).parse ();
2637
2633
return actions.numErrors == 0 ;
2638
2634
}
2639
2635
0 commit comments