r232842 added an assert that fires with the included testcase. Add an exception for '__thread_ptr' to canGoAfterDWARF().
Note: I don't know much about MC or whether this is the right thing to do. At a first glance this code looks like we should rather have a blacklist of sections that must not go after the dwarf sections rather than having a whitelist of sections that are allowed to go. (For example if you read ARMAsmPrinter::EmitEndOfAsmFile() there is another section called "Drectve" that is output after the debug info...
It would be better to check the ASM output for the section switch commands. Otherwise this test succeeds even if llc is symlinked to /bin/true ;-)