diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/graph.cc | 6 | ||||
-rw-r--r-- | src/graph.h | 2 | ||||
-rw-r--r-- | src/parsers_test.cc | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/graph.cc b/src/graph.cc index 10aaeb3..e2f966c 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -223,17 +223,17 @@ string Edge::GetDescription() { } bool Edge::HasRspFile() { - return !rule_->rspfile_.empty(); + return !rule_->rspfile().empty(); } string Edge::GetRspFile() { EdgeEnv env(this); - return rule_->rspfile_.Evaluate(&env); + return rule_->rspfile().Evaluate(&env); } string Edge::GetRspFileContent() { EdgeEnv env(this); - return rule_->rspfile_content_.Evaluate(&env); + return rule_->rspfile_content().Evaluate(&env); } bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface, diff --git a/src/graph.h b/src/graph.h index b66316d..aa1bf49 100644 --- a/src/graph.h +++ b/src/graph.h @@ -108,6 +108,8 @@ struct Rule { EvalString& command() { return command_; } const EvalString& description() const { return description_; } const EvalString& depfile() const { return depfile_; } + const EvalString& rspfile() const { return rspfile_; } + const EvalString& rspfile_content() const { return rspfile_content_; } private: // Allow the parsers to reach into this object and fill out its fields. diff --git a/src/parsers_test.cc b/src/parsers_test.cc index ff04608..a8bf179 100644 --- a/src/parsers_test.cc +++ b/src/parsers_test.cc @@ -111,8 +111,8 @@ TEST_F(ParserTest, ResponseFiles) { const Rule* rule = state.rules_.begin()->second; EXPECT_EQ("cat_rsp", rule->name()); EXPECT_EQ("[cat ][$rspfile][ > ][$out]", rule->command().Serialize()); - EXPECT_EQ("[$rspfile]", rule->rspfile_.Serialize()); - EXPECT_EQ("[$in]", rule->rspfile_content_.Serialize()); + EXPECT_EQ("[$rspfile]", rule->rspfile().Serialize()); + EXPECT_EQ("[$in]", rule->rspfile_content().Serialize()); } TEST_F(ParserTest, Variables) { |