diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-08-27 23:57:18 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-08-27 23:57:18 +0000 |
| commit | c7971a9efdf9880448a69aabb5182c3c27eecf6d (patch) | |
| tree | 83651c2c42fcaa4a893e4cfc32e052d53eba9d92 /lib/CodeGen/CodeGenFunction.h | |
| parent | c1cc488c3cf9ce7f7b7e211e891e2be7391e0e5a (diff) | |
| download | clang-c7971a9efdf9880448a69aabb5182c3c27eecf6d.tar.gz clang-c7971a9efdf9880448a69aabb5182c3c27eecf6d.tar.bz2 clang-c7971a9efdf9880448a69aabb5182c3c27eecf6d.tar.xz | |
Revert "PR14569: Omit debug info for thunks"
This reverts commit r189320.
Alexey Samsonov and Dmitry Vyukov presented some arguments for keeping
these around - though it still seems like those tasks could be solved by
a tool just using the symbol table. In a very small number of cases,
thunks may be inlined & debug info might be able to save profilers &
similar tools from misclassifying those cases as part of the caller.
The extra changes here plumb through the VarDecl for various cases to
CodeGenFunction - this provides better fidelity through a few APIs but
generally just causes the CGF::StartFunction to fallback to using the
name of the IR function as the name in the debug info.
The changes to debug-info-global-ctor-dtor.cpp seem like goodness. The
two names that go missing (in favor of only emitting those names as
linkage names) are names that can be demangled - emitting them only as
the linkage name should encourage tools to do just that.
Again, thanks to Dinesh Dwivedi for investigation/work on this issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 0e8ab4a987..20c0b82553 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -1021,10 +1021,10 @@ public: bool useEHCleanupForArray); void emitDestroy(llvm::Value *addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray); - llvm::Function *generateDestroyHelper(llvm::Constant *addr, - QualType type, + llvm::Function *generateDestroyHelper(llvm::Constant *addr, QualType type, Destroyer *destroyer, - bool useEHCleanupForArray); + bool useEHCleanupForArray, + const VarDecl *VD); void emitArrayDestroy(llvm::Value *begin, llvm::Value *end, QualType type, Destroyer *destroyer, bool checkZeroLength, bool useEHCleanup); @@ -2305,7 +2305,8 @@ public: /// Call atexit() with a function that passes the given argument to /// the given function. - void registerGlobalDtorWithAtExit(llvm::Constant *fn, llvm::Constant *addr); + void registerGlobalDtorWithAtExit(const VarDecl &D, llvm::Constant *fn, + llvm::Constant *addr); /// Emit code in this function to perform a guarded variable /// initialization. Guarded initializations are used when it's not |
