[PATCH] D25927: [cfi] Implement cfi-icall using inline assembly.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 13:07:02 PDT 2016

pcc added inline comments.

Comment at: lib/Transforms/IPO/LowerTypeTests.cpp:669
+  SmallString<16> Name;
+  Mangler::getNameWithPrefix(Name, Dest->getName(), M.getDataLayout());
echristo wrote:
> eugenis wrote:
> > pcc wrote:
> > > Although I think it doesn't matter in this case, it would probably be better to use the overload that takes a `GlobalValue`.
> > That one is not static. It can assign temporary labels for unnamed globals, but to use that we would need to access the instance in TargetLoweringObjectFile, not create our own.
> > 
> This is why I was mentioning wanting TLOF for this in general. Effectively you can get two different sets of labels if you try the "calling Mangler myself" path.
> I'd rather initialize/split TLOF early on the TM rather than have lots of different mechanisms to get symbol names.
But you're renaming unnamed globals elsewhere? With that just a temporary instance should be enough.



More information about the llvm-commits mailing list