From 34e1707fbbec87f1d978b892efccfdb73ff5068a Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 12 Oct 2011 22:23:12 +0000 Subject: [PATCH] Don't label a STAB debugging symbol as a function symbol. llvm-svn: 141824 --- llvm/lib/Object/MachOObjectFile.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 0d4dbd9ec45a..86d87ed0f2f7 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -241,6 +241,11 @@ error_code MachOObjectFile::getSymbolType(DataRefImpl Symb, n_type = Entry->Type; } Res = SymbolRef::ST_Other; + + // If this is a STAB debugging symbol, we can do nothing more. + if (n_type & MachO::NlistMaskStab) + return object_error::success; + switch (n_type & MachO::NlistMaskType) { case MachO::NListTypeUndefined : Res = SymbolRef::ST_External;