Skip to content

Commit

Permalink
Merge pull request #3987 from awallace-cray/chapdev-104.3935
Browse files Browse the repository at this point in the history
Attempt to turn cpp #line directives back on when debugging (from #3935)
  • Loading branch information
awallace-cray committed Jun 9, 2016
2 parents 5b6e861 + 663e25e commit 9763bc4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion compiler/util/files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,16 @@ void openCFile(fileinfo* fi, const char* name, const char* ext) {

void closeCFile(fileinfo* fi, bool beautifyIt) {
fclose(fi->fptr);
if (beautifyIt && saveCDir[0])
//
// We should beautify if (1) we were asked to and (2) either (a) we
// were asked to save the C code or (b) we're debugging and were
// asked to codegen cpp #line information.
//
// TODO: With some refactoring, we could simply do the #line part of
// beautify without also improving indentation and such which could
// save some time.
//
if (beautifyIt && (saveCDir[0] || (debugCCode && printCppLineno)))
beautify(fi);
}

Expand Down

0 comments on commit 9763bc4

Please sign in to comment.