From 59eaa3874663f80ce111a4781b8f1db82995210c Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 28 Jun 2013 20:05:11 +0000 Subject: 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 --- lib/Target/TargetLoweringObjectFile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Target') diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index f5121e3..fc50aa5 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -317,3 +317,9 @@ getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding, } } } + +const MCSymbolRefExpr *TargetLoweringObjectFile::getDebugThreadLocalSymbol(const MCSymbol *Sym) const { + // FIXME: It's not clear what, if any, default this should have - perhaps a + // null return could mean 'no location' & we should just do that here. + return MCSymbolRefExpr::Create(Sym, *Ctx); +} -- cgit v1.1