[PATCH] D24334: [EfficiencySanitizer] Using '_' instead of '#' for struct counter name
Sagar Thakur via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 02:32:59 PDT 2016
slthakur created this revision.
slthakur added a reviewer: bruening.
slthakur added subscribers: jaydeep, llvm-commits.
slthakur set the repository for this revision to rL LLVM.
slthakur added a project: Sanitizers.
For MIPS '#' is the start of comment line. Therefore we get assembler errors if # is used in the structure names.
Repository:
rL LLVM
https://reviews.llvm.org/D24334
Files:
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
Index: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
===================================================================
--- lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
+++ lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
@@ -304,18 +304,18 @@
// MaxStructCounterNameSize and append #NumFields and at least one
// field type id.
// Append #NumFields.
- NameStr += "#";
+ NameStr += "_";
Twine(StructTy->getNumElements()).toVector(NameStr);
// Append struct field type ids in the reverse order.
for (int i = StructTy->getNumElements() - 1; i >= 0; --i) {
- NameStr += "#";
+ NameStr += "_";
Twine(StructTy->getElementType(i)->getTypeID()).toVector(NameStr);
if (NameStr.size() >= MaxStructCounterNameSize)
break;
}
if (StructTy->isLiteral()) {
- // End with # for literal struct.
- NameStr += "#";
+ // End with _ for literal struct.
+ NameStr += "_";
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24334.70668.patch
Type: text/x-patch
Size: 948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160908/f2200ec2/attachment.bin>
More information about the llvm-commits
mailing list