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

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 13:46:47 PDT 2016


eugenis added inline comments.


================
Comment at: lib/Transforms/IPO/LowerTypeTests.cpp:669
+  SmallString<16> Name;
+  Mangler::getNameWithPrefix(Name, Dest->getName(), M.getDataLayout());
+
----------------
eugenis wrote:
> pcc wrote:
> > 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.
> Actually, the current code does not handle unnamed functions. I'll fix it.
> 
> Eric, could you elaborate on the "initialize/split TLOF early on the TM"?
Renaming unnamed globals now.
Switched to non-static Mangler methods - they seem to do something special on Windows;  we probably want that.


Repository:
  rL LLVM

https://reviews.llvm.org/D25927





More information about the llvm-commits mailing list