[PATCH] D78243: New pass to make internal linkage symbol names unique

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 14:05:17 PDT 2020


tmsriram marked an inline comment as done.
tmsriram added inline comments.


================
Comment at: llvm/test/Transforms/UniqueInternalLinkageNames/unique_symbol_names.ll:2
+; RUN: opt -S -unique-internal-linkage-names < %s | FileCheck %s
+
+ at glob = internal global i32 0
----------------
rnk wrote:
> I suspect `Module::getSourceFilename` in this example returns "", so you are adding a hash of the empty string. I think it would be better to add `source_filename = "foo.cpp"` here, and then explicitly check for the hex bits in the names. That ensures that everyone gets the same results everywhere, and will detect changes in the hashing.
Great catch!  You are right. I wrongly assumed that the module name would be .ll file name but since I use '<' it is the empty string.  I will fix it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78243/new/

https://reviews.llvm.org/D78243





More information about the llvm-commits mailing list