summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-02-23 00:21:46 (GMT)
committerEvan Martin <martine@danga.com>2012-02-23 00:21:46 (GMT)
commiteab83e9774330a754e44ba023781e1c0a07d923f (patch)
treea54831216c913e20564eaf286e60cb8cc75f7b75 /src
parent18af8109589bee938e076670487a024a209a82cd (diff)
downloadNinja-eab83e9774330a754e44ba023781e1c0a07d923f.zip
Ninja-eab83e9774330a754e44ba023781e1c0a07d923f.tar.gz
Ninja-eab83e9774330a754e44ba023781e1c0a07d923f.tar.bz2
fix some public/private errors in rspfile patch
Diffstat (limited to 'src')
-rw-r--r--src/graph.cc6
-rw-r--r--src/graph.h2
-rw-r--r--src/parsers_test.cc4
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) {