-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[flang] Main program symbol no longer conflicts with the other symbols #149169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang] Main program symbol no longer conflicts with the other symbols #149169
Conversation
... by making main program symbol names upper case.
|
I'm not using private e-mail address. |
// Uppercase the name of the main program, so that its symbol name | ||
// would be unique from similarly named non-main-program symbols. | ||
auto upperCaseCharBlock = [](const parser::CharBlock &cb) { | ||
char *ch = const_cast<char *>(cb.begin()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please always use braced initialization in the bits of flang-new that are modern C++.
} | ||
const parser::CharBlock *endName{GetStmtName( | ||
std::get<parser::Statement<parser::EndProgramStmt>>(mainProgram.t))}; | ||
if (endName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two if
statements could each be combined with the preceding local variable declarations.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/34156 Here is the relevant piece of the build log for the reference
|
Test modifications: #149508 |
The following code is now accepted:
The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts.
This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream.
Modified the tests that were checking for lower case main program name.