aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-06-28 20:05:11 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-06-28 20:05:11 +0000
commit59eaa3874663f80ce111a4781b8f1db82995210c (patch)
tree996e6895665112c7efb69fd8480b323e7cad5c29 /include
parent95e72c90e4e2ee64e12d898f6495e796ebcadaf8 (diff)
downloadexternal_llvm-59eaa3874663f80ce111a4781b8f1db82995210c.zip
external_llvm-59eaa3874663f80ce111a4781b8f1db82995210c.tar.gz
external_llvm-59eaa3874663f80ce111a4781b8f1db82995210c.tar.bz2
DebugInfo: PR14728: TLS support
Based on GCC's output for TLS variables (OP_constNu, x@dtpoff, OP_lo_user), this implements debug info support for TLS in ELF. Verified that this output is correct/sufficient on Linux (using gold - if you're using binutils-ld, you'll need something with the fix for http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it). Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks want to discuss (or just go ahead & implement) how this should work in MachO, etc, I'm open. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/TargetLoweringObjectFileImpl.h3
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
index 5b22c9c..5e11ecf 100644
--- a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
+++ b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
@@ -72,6 +72,9 @@ public:
getStaticCtorSection(unsigned Priority = 65535) const;
virtual const MCSection *
getStaticDtorSection(unsigned Priority = 65535) const;
+
+ /// \brief Describe a TLS variable address within debug info.
+ virtual const MCSymbolRefExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const;
};
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 9958755..a17feeb 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -138,6 +138,10 @@ public:
return StaticDtorSection;
}
+ /// \brief Create a symbol reference to describe the given TLS variable when
+ /// emitting the address in debug info.
+ virtual const MCSymbolRefExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const;
+
protected:
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,