Skip to content

Commit a422079

Browse files
committed
add comment explaining '%'
1 parent 1e0cb7e commit a422079

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ std::string NVPTXAssignValidGlobalNames::cleanUpName(StringRef Name) {
7474
std::string ValidName;
7575
raw_string_ostream ValidNameStream(ValidName);
7676
for (char C : Name) {
77+
// While PTX also allows '%' at the start of identifiers, LLVM will throw a
78+
// fatal error for '%' in symbol names in MCSymbol::print. Exclude for now.
7779
if (isAlnum(C) || C == '_' || C == '$') {
7880
ValidNameStream << C;
7981
} else {

0 commit comments

Comments
 (0)