Better SourcePos reporting for gathers/scatters

This commit is contained in:
Matt Pharr
2011-11-16 16:22:51 -08:00
parent f5a21d96a1
commit 068ea3e4c4
4 changed files with 41 additions and 20 deletions

View File

@@ -350,10 +350,12 @@ Globals::Globals() {
///////////////////////////////////////////////////////////////////////////
// SourcePos
SourcePos::SourcePos(const char *n, int l, int c) {
SourcePos::SourcePos(const char *n, int fl, int fc, int ll, int lc) {
name = n ? n : m->module->getModuleIdentifier().c_str();
first_line = last_line = l;
first_column = last_column = c;
first_line = fl;
first_column = fc;
last_line = ll != 0 ? ll : fl;
last_column = lc != 0 ? lc : fc;
}