Revert r268716. This has caused test failures in MSan on Linux.
llvm-svn: 268723
This commit is contained in:
parent
6d8078f993
commit
12aaa1c955
|
@ -63,20 +63,6 @@ const char *DemangleCXXABI(const char *name) {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// As of now, there are no headers for the Swift runtime. Once they are
|
|
||||||
// present, we will weakly link since we do not require Swift runtime to be
|
|
||||||
// linked.
|
|
||||||
typedef char *(*swift_demangle_ft)(const char *mangledName,
|
|
||||||
size_t mangledNameLength, char *outputBuffer,
|
|
||||||
size_t *outputBufferSize, uint32_t flags);
|
|
||||||
static swift_demangle_ft swift_demangle_f;
|
|
||||||
|
|
||||||
// This must not happen lazily, because dlsym uses thread-local storage, which
|
|
||||||
// is not a good thing to do during symbolication.
|
|
||||||
static void InitializeSwiftDemangler() {
|
|
||||||
swift_demangle_f = (swift_demangle_ft)dlsym(RTLD_DEFAULT, "swift_demangle");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attempts to demangle a Swift name. The demangler will return nullptr
|
// Attempts to demangle a Swift name. The demangler will return nullptr
|
||||||
/// if a non-Swift name is passed in.
|
/// if a non-Swift name is passed in.
|
||||||
const char *DemangleSwift(const char *name) {
|
const char *DemangleSwift(const char *name) {
|
||||||
|
@ -86,6 +72,16 @@ const char *DemangleSwift(const char *name) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// As of now, there are no headers for the Swift runtime. Once they are
|
||||||
|
// present, we will weakly link since we do not require Swift runtime to be
|
||||||
|
// linked.
|
||||||
|
typedef char *(*swift_demangle_ft)(const char *mangledName,
|
||||||
|
size_t mangledNameLength,
|
||||||
|
char *outputBuffer,
|
||||||
|
size_t *outputBufferSize,
|
||||||
|
uint32_t flags);
|
||||||
|
swift_demangle_ft swift_demangle_f =
|
||||||
|
(swift_demangle_ft) dlsym(RTLD_DEFAULT, "swift_demangle");
|
||||||
if (swift_demangle_f)
|
if (swift_demangle_f)
|
||||||
return swift_demangle_f(name, internal_strlen(name), 0, 0, 0);
|
return swift_demangle_f(name, internal_strlen(name), 0, 0, 0);
|
||||||
|
|
||||||
|
@ -483,8 +479,6 @@ static void ChooseSymbolizerTools(IntrusiveList<SymbolizerTool> *list,
|
||||||
}
|
}
|
||||||
|
|
||||||
Symbolizer *Symbolizer::PlatformInit() {
|
Symbolizer *Symbolizer::PlatformInit() {
|
||||||
InitializeSwiftDemangler();
|
|
||||||
|
|
||||||
IntrusiveList<SymbolizerTool> list;
|
IntrusiveList<SymbolizerTool> list;
|
||||||
list.clear();
|
list.clear();
|
||||||
ChooseSymbolizerTools(&list, &symbolizer_allocator_);
|
ChooseSymbolizerTools(&list, &symbolizer_allocator_);
|
||||||
|
|
Loading…
Reference in New Issue