Commit ab8242ca by Jim Stichnoth

Fix a C++ violation.

Ice::Inst::NumberSentinel is defined within the Inst class definition: class Inst { ... static const InstNumberT NumberDeleted = -1; static const InstNumberT NumberSentinel = 0; ... }; Under some compilers/options, this causes a link error when passing NumberSentinel as a const T& argument. (Another option would be to move the actual definitions into IceInst.cpp.) BUG= none R=jfb@chromium.org Review URL: https://codereview.chromium.org/311243006
parent d97c7df5
......@@ -235,8 +235,9 @@ bool CfgNode::liveness(Liveness *Liveness) {
// with the sentinel instruction number 0.
std::vector<InstNumberT> &LiveBegin = Liveness->getLiveBegin(this);
std::vector<InstNumberT> &LiveEnd = Liveness->getLiveEnd(this);
LiveBegin.assign(NumVars, Inst::NumberSentinel);
LiveEnd.assign(NumVars, Inst::NumberSentinel);
InstNumberT Sentinel = Inst::NumberSentinel;
LiveBegin.assign(NumVars, Sentinel);
LiveEnd.assign(NumVars, Sentinel);
// Initialize Live to be the union of all successors' LiveIn.
for (NodeList::const_iterator I = OutEdges.begin(), E = OutEdges.end();
I != E; ++I) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment