fix some public/private errors in rspfile patch
authorEvan Martin <martine@danga.com>
Thu, 23 Feb 2012 00:21:46 +0000 (16:21 -0800)
committerEvan Martin <martine@danga.com>
Thu, 23 Feb 2012 00:21:46 +0000 (16:21 -0800)
src/graph.cc
src/graph.h
src/parsers_test.cc

index 10aaeb3..e2f966c 100644 (file)
@@ -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,
index b66316d..aa1bf49 100644 (file)
@@ -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.
index ff04608..a8bf179 100644 (file)
@@ -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) {